- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for TestNaN (0.1 sec)
-
src/syscall/js/js_test.go
t.Errorf("same object is not equal") } if dummys.Get("someFloat").Equal(dummys.Get("someInt")) { t.Errorf("different values are not unequal") } } func TestNaN(t *testing.T) { if !dummys.Get("NaN").IsNaN() { t.Errorf("JS NaN is not NaN") } if !js.ValueOf(math.NaN()).IsNaN() { t.Errorf("Go NaN is not NaN") } if dummys.Get("NaN").Equal(dummys.Get("NaN")) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 19 14:35:26 UTC 2024 - 17.7K bytes - Viewed (0) -
src/fmt/scan_test.go
} if !math.IsNaN(float64(f)) || !math.IsNaN(float64(f32)) || !math.IsNaN(f64) { t.Errorf("didn't get NaNs scanning %q: got %g %g %g", text, f, f32, f64) } } func TestNaN(t *testing.T) { for _, s := range []string{"nan", "NAN", "NaN"} { verifyNaN(s, t) } } func verifyInf(str string, t *testing.T) { var f float64 var f32 float32 var f64 float64
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 20:25:13 UTC 2023 - 39.3K bytes - Viewed (0) -
src/math/all_test.go
func alike(a, b float64) bool { switch { case IsNaN(a) && IsNaN(b): return true case a == b: return Signbit(a) == Signbit(b) } return false } func TestNaN(t *testing.T) { f64 := NaN() if f64 == f64 { t.Fatalf("NaN() returns %g, expected NaN", f64) } f32 := float32(f64) if f32 == f32 { t.Fatalf("float32(NaN()) is %g, expected NaN", f32) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jul 07 17:39:26 UTC 2023 - 86.8K bytes - Viewed (0)