Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for AwayFromZero (0.18 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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