- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for checkNonLossyRoundtrip32 (0.28 sec)
-
src/math/big/rat_test.go
var r Rat if r2 := r.SetFloat64(f); r2 != nil { t.Errorf("SetFloat64(%g) was %v, want nil", f, r2) } } } // checkNonLossyRoundtrip32 checks that a float->Rat->float roundtrip is // non-lossy for finite f. func checkNonLossyRoundtrip32(t *testing.T, f float32) { if !isFinite(float64(f)) { return } r := new(Rat).SetFloat64(float64(f)) if r == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 07 00:15:59 UTC 2022 - 18.9K bytes - Viewed (0) -
src/math/big/ratconv_test.go
if !checkIsBestApprox32(t, f, r) { // Append context information. t.Errorf("(input was %q)", input) } // 3. Check f->R->f roundtrip is non-lossy. checkNonLossyRoundtrip32(t, f) // 4. Check exactness using slow algorithm. if wasExact := new(Rat).SetFloat64(float64(f)).Cmp(r) == 0; wasExact != exact {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 15 22:16:34 UTC 2023 - 19.3K bytes - Viewed (0)