Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for checkIsBestApprox64 (0.31 sec)

  1. src/math/big/rat_test.go

    		return false
    	}
    	return true
    }
    
    // checkIsBestApprox64 checks that f is the best possible float64
    // approximation of r.
    // Returns true on success.
    func checkIsBestApprox64(t *testing.T, f float64, r *Rat) bool {
    	if math.Abs(f) >= math.MaxFloat64 {
    		// Cannot check +Inf, -Inf, nor the float next to them (MaxFloat64).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 07 00:15:59 UTC 2022
    - 18.9K bytes
    - Viewed (0)
  2. src/math/big/ratconv_test.go

    			}
    		}
    
    		if !isFinite(f) {
    			continue
    		}
    
    		// 2. Check f is best approximation to r.
    		if !checkIsBestApprox64(t, f, r) {
    			// Append context information.
    			t.Errorf("(input was %q)", input)
    		}
    
    		// 3. Check f->R->f roundtrip is non-lossy.
    		checkNonLossyRoundtrip64(t, f)
    
    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