You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have implemented a wrapper class for use in a set of mathemetical calculations I am experimenting with. I am trying to present an arbitrary math set of tools largely because IEEE standards introduce many approximations. So I have been unit testing the use of BDouble to support my needs, and i have found several use cases where BDouble loops infinitely. one such use case is the square root of 1024000.0. My unit test is very simple.
func testSqrt1MPure() {
BDouble.precision = 30
let testcase = BDouble("1024000")!
let testResult = testcase.nthroot(2)
XCTAssert(testResult - BDouble("1011.92885125388138623964593421847026868")! < Double.ulpOfOne, "testcase5 = testResult.decimalExpansion(precisionAfterDecimalPoint: 30))")
}
The text was updated successfully, but these errors were encountered:
I have implemented a wrapper class for use in a set of mathemetical calculations I am experimenting with. I am trying to present an arbitrary math set of tools largely because IEEE standards introduce many approximations. So I have been unit testing the use of BDouble to support my needs, and i have found several use cases where BDouble loops infinitely. one such use case is the square root of 1024000.0. My unit test is very simple.
func testSqrt1MPure() {
BDouble.precision = 30
The text was updated successfully, but these errors were encountered: