Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for AwayFromZero (0.16 sec)

  1. src/math/big/roundingmode_string.go

    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[ToNearestEven-0]
    	_ = x[ToNearestAway-1]
    	_ = x[ToZero-2]
    	_ = x[AwayFromZero-3]
    	_ = x[ToNegativeInf-4]
    	_ = x[ToPositiveInf-5]
    }
    
    const _RoundingMode_name = "ToNearestEvenToNearestAwayToZeroAwayFromZeroToNegativeInfToPositiveInf"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:24:07 UTC 2023
    - 819 bytes
    - Viewed (0)
  2. src/math/big/float_test.go

    		op         byte
    	}{
    		{ToZero, 3, -0x8, -0x1, -0x8, '+'},
    		{AwayFromZero, 3, -0x8, -0x1, -0xa, '+'},
    		{ToNegativeInf, 3, -0x8, -0x1, -0xa, '+'},
    
    		{ToZero, 3, -0x8, 0x1, -0x8, '-'},
    		{AwayFromZero, 3, -0x8, 0x1, -0xa, '-'},
    		{ToNegativeInf, 3, -0x8, 0x1, -0xa, '-'},
    
    		{ToZero, 3, -0x9, 0x1, -0x8, '*'},
    		{AwayFromZero, 3, -0x9, 0x1, -0xa, '*'},
    		{ToNegativeInf, 3, -0x9, 0x1, -0xa, '*'},
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 51.9K bytes
    - Viewed (0)
  3. src/math/big/floatexample_test.go

    			f := new(big.Float).SetPrec(2).SetMode(mode).SetFloat64(f64)
    			fmt.Printf("  %*g", len(mode.String()), f)
    		}
    		fmt.Println()
    	}
    
    	// Output:
    	//    x  ToNearestEven  ToNearestAway  ToZero  AwayFromZero  ToNegativeInf  ToPositiveInf
    	//  2.6              3              3       2             3              2              3
    	//  2.5              2              3       2             3              2              3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  4. src/math/big/floatmarsh_test.go

    	for _, test := range floatVals {
    		for _, sign := range []string{"", "+", "-"} {
    			for _, prec := range []uint{0, 1, 2, 10, 53, 64, 100, 1000} {
    				for _, mode := range []RoundingMode{ToNearestEven, ToNearestAway, ToZero, AwayFromZero, ToNegativeInf, ToPositiveInf} {
    					medium.Reset() // empty buffer for each test case (in case of failures)
    					x := sign + test
    
    					var tx Float
    					_, _, err := tx.SetPrec(prec).SetMode(mode).Parse(x, 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 23 18:18:05 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  5. src/math/big/bits_test.go

    	}
    
    	// round
    	f := z.Float() // rounded to zero
    	if mode == ToNearestAway {
    		panic("not yet implemented")
    	}
    	if mode == ToNearestEven && rbit == 1 && (sbit == 1 || sbit == 0 && bit0 != 0) || mode == AwayFromZero {
    		// round away from zero
    		f.SetMode(ToZero).SetPrec(prec)
    		f.Add(f, Bits{int(r) + 1}.Float())
    	}
    	return f
    }
    
    // Float returns the *Float z of the smallest possible precision such that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. src/math/big/floatconv_test.go

    		{"8191.53125", ToNearestEven, 53, 'x', 5, "0x1.fff88p+12"},
    		{"8191.53125", ToNearestAway, 53, 'x', 5, "0x1.fff88p+12"},
    		{"8191.53125", ToZero, 53, 'x', 5, "0x1.fff88p+12"},
    		{"8191.53125", AwayFromZero, 53, 'x', 5, "0x1.fff88p+12"},
    		{"8191.53125", ToNegativeInf, 53, 'x', 5, "0x1.fff88p+12"},
    		{"8191.53125", ToPositiveInf, 53, 'x', 5, "0x1.fff88p+12"},
    
    		{"8191.53125", defaultRound, 53, 'x', 4, "0x1.fff8p+12"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 24.3K bytes
    - Viewed (0)
  7. api/go1.5.txt

    pkg log, func Output(int, string) error
    pkg log, method (*Logger) SetOutput(io.Writer)
    pkg math/big, const Above = 1
    pkg math/big, const Above Accuracy
    pkg math/big, const AwayFromZero = 3
    pkg math/big, const AwayFromZero RoundingMode
    pkg math/big, const Below = -1
    pkg math/big, const Below Accuracy
    pkg math/big, const Exact = 0
    pkg math/big, const Exact Accuracy
    pkg math/big, const MaxExp = 2147483647
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 30 21:14:09 UTC 2015
    - 46.6K bytes
    - Viewed (0)
  8. src/math/big/float.go

    const (
    	ToNearestEven RoundingMode = iota // == IEEE 754-2008 roundTiesToEven
    	ToNearestAway                     // == IEEE 754-2008 roundTiesToAway
    	ToZero                            // == IEEE 754-2008 roundTowardZero
    	AwayFromZero                      // no IEEE 754-2008 equivalent
    	ToNegativeInf                     // == IEEE 754-2008 roundTowardNegative
    	ToPositiveInf                     // == IEEE 754-2008 roundTowardPositive
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 44.5K bytes
    - Viewed (0)
  9. src/go/constant/value.go

    			// try rounding down a little
    			t.SetMode(big.ToZero)
    			t.Set(x.val)
    			if _, acc := t.Int(i); acc == big.Exact {
    				return makeInt(i)
    			}
    
    			// try rounding up a little
    			t.SetMode(big.AwayFromZero)
    			t.Set(x.val)
    			if _, acc := t.Int(i); acc == big.Exact {
    				return makeInt(i)
    			}
    		}
    
    	case complexVal:
    		if re := ToFloat(x); re.Kind() == Float {
    			return ToInt(re)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*Rat).UnmarshalText", Method, 3},
    		{"(Accuracy).String", Method, 5},
    		{"(ErrNaN).Error", Method, 5},
    		{"(RoundingMode).String", Method, 5},
    		{"Above", Const, 5},
    		{"Accuracy", Type, 5},
    		{"AwayFromZero", Const, 5},
    		{"Below", Const, 5},
    		{"ErrNaN", Type, 5},
    		{"Exact", Const, 5},
    		{"Float", Type, 5},
    		{"Int", Type, 0},
    		{"Jacobi", Func, 5},
    		{"MaxBase", Const, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top