Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for TestFP (1.62 sec)

  1. src/strconv/testdata/testfp.txt

    Russ Cox <******@****.***> 1410149331 -0400
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 7.9K bytes
    - Viewed (0)
  2. src/strconv/fp_test.go

    	}
    	f64, err1 := strconv.ParseFloat(s, 32)
    	f1 := float32(f64)
    	if err1 != nil {
    		return 0, false
    	}
    	return f1, true
    }
    
    func TestFp(t *testing.T) {
    	f, err := os.Open("testdata/testfp.txt")
    	if err != nil {
    		t.Fatal("testfp: open testdata/testfp.txt:", err)
    	}
    	defer f.Close()
    
    	s := bufio.NewScanner(f)
    
    	for lineno := 1; s.Scan(); lineno++ {
    		line := s.Text()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 06 15:53:04 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  3. src/strconv/ftoa_test.go

    	{"64Fixed2", 123.456, 'e', 3, 64},
    	{"64Fixed3", 1.23456e+78, 'e', 3, 64},
    	{"64Fixed4", 1.23456e-78, 'e', 3, 64},
    	{"64Fixed12", 1.23456e-78, 'e', 12, 64},
    	{"64Fixed16", 1.23456e-78, 'e', 16, 64},
    	// From testdata/testfp.txt
    	{"64Fixed12Hard", math.Ldexp(6965949469487146, -249), 'e', 12, 64},
    	{"64Fixed17Hard", math.Ldexp(8887055249355788, 665), 'e', 17, 64},
    	{"64Fixed18Hard", math.Ldexp(6994187472632449, 690), 'e', 18, 64},
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 24 23:50:20 UTC 2022
    - 9.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/testdata/fp_test.go

    	expectFalse(t, fmt.Sprintf("%v==%v", a, b), c2)
    	expectFalse(t, fmt.Sprintf("%v!=%v", a, a), c3)
    	expectTrue(t, fmt.Sprintf("%v!=%v", a, b), c4)
    }
    
    // TestFP tests that we get the right answer for floating point expressions.
    func TestFP(t *testing.T) {
    	a := 3.0
    	b := 4.0
    
    	c := float32(3.0)
    	d := float32(4.0)
    
    	tiny := float32(1.5e-45) // smallest f32 denorm = 2**(-149)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 35K bytes
    - Viewed (0)
  5. src/math/big/ratconv_test.go

    	}
    }
    
    // Test inputs to Rat.SetString. The prefix "long:" causes the test
    // to be skipped except in -long mode.  (The threshold is about 500us.)
    var float64inputs = []string{
    	// Constants plundered from strconv/testfp.txt.
    
    	// Table 1: Stress Inputs for Conversion to 53-bit Binary, < 1/2 ULP
    	"5e+125",
    	"69e+267",
    	"999e-026",
    	"7861e-034",
    	"75569e-254",
    	"928609e-261",
    	"9210917e+080",
    	"84863171e+114",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 19.3K bytes
    - Viewed (0)
Back to top