<commit_before>//
//  AudioKitHelpers+Approximation.swift
//  AudioKit For iOS
//
//  Created by <NAME> on 4/28/18.
//  Copyright © 2018 AudioKit. All rights reserved.
//

import Foundation

/// Approximation Operators - for when Swift gets double / float arithmetic wrong
infix operator ==~ : ComparisonPrecedence
public func ==~ (left: Double, right: Double) -> Bool
{
    return fabs(left.distance(to: right)) <= 1e-15
}
infix operator !=~ : ComparisonPrecedence
public func !=~ (left: Double, right: Double) -> Bool
{
    return !(left ==~ right)
}
infix operator <=~ : ComparisonPrecedence
public func <=~ (left: Double, right: Double) -> Bool
{
    return (left ==~ right) || (left <~ right)
}
infix operator >=~ : ComparisonPrecedence
public func >=~ (left: Double, right: Double) -> Bool
{
    return (left ==~ right) || (left >~ right)
}
infix operator <~ : ComparisonPrecedence
public func <~ (left: Double, right: Double) -> Bool
{
    return left.distance(to: right) > 1e-15
}
infix operator >~ : ComparisonPrecedence
public func >~ (left: Double, right: Double) -> Bool
{
    return left.distance(to: right) < -1e-15
}<commit_msg>renamed approximation operators<commit_after>//
//  AudioKitHelpers+Approximation.swift
//  AudioKit For iOS
//
//  Created by <NAME> on 4/28/18.
//  Copyright © 2018 AudioKit. All rights reserved.
//

import Foundation

/// Approximation Operators - for when Swift gets double / float arithmetic wrong
infix operator ~== : ComparisonPrecedence
public func ~== (left: Double, right: Double) -> Bool
{
    return fabs(left.distance(to: right)) <= 1e-15
}
infix operator ~!= : ComparisonPrecedence
public func ~!= (left: Double, right: Double) -> Bool
{
    return !(left ~== right)
}
infix operator ~<= : ComparisonPrecedence
public func ~<= (left: Double, right: Double) -> Bool
{
    return (left ~== right) || (left ~< right)
}
infix operator ~>= : ComparisonPrecedence
public func ~>= (left: Double, right: Double) -> Bool
{
    return (left ~== right) || (left ~> right)
}
infix operator ~< : ComparisonPrecedence
public func ~< (left: Double, right: Double) -> Bool
{
    return left.distance(to: right) > 1e-15
}
infix operator ~> : ComparisonPrecedence
public func ~> (left: Double, right: Double) -> Bool
{
    return left.distance(to: right) < -1e-15
}
{'fraction_non_alphanumeric': 0.15104166666666666, 'fraction_numerical': 0.015625, 'mean_word_length': 3.8526315789473684, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3434228', 'n_tokens_mistral': 782, 'n_tokens_neox': 728, 'n_words': 230}