Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 682 for float2 (0.1 sec)

  1. src/math/big/float.go

    // than Float values, and each unique Float value requires
    // its own unique *Float pointer. To "copy" a Float value,
    // an existing (or newly allocated) Float must be set to
    // a new value using the [Float.Set] method; shallow copies
    // of Floats are not supported and may lead to errors.
    type Float struct {
    	prec uint32
    	mode RoundingMode
    	acc  Accuracy
    	form form
    	neg  bool
    	mant nat
    	exp  int32
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 44.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/primitives/Floats.java

       * @param b the second {@code float} to compare
       * @return the result of invoking {@link Float#compare(float, float)}
       */
      public static int compare(float a, float b) {
        return Float.compare(a, b);
      }
    
      /**
       * Returns {@code true} if {@code value} represents a real number. This is equivalent to, but not
       * necessarily implemented as, {@code !(Float.isInfinite(value) || Float.isNaN(value))}.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 29 15:43:06 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/primitives/Floats.java

       * @param b the second {@code float} to compare
       * @return the result of invoking {@link Float#compare(float, float)}
       */
      public static int compare(float a, float b) {
        return Float.compare(a, b);
      }
    
      /**
       * Returns {@code true} if {@code value} represents a real number. This is equivalent to, but not
       * necessarily implemented as, {@code !(Float.isInfinite(value) || Float.isNaN(value))}.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 29 15:43:06 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  4. src/math/big/rat_test.go

    	// r must be strictly between f0 and f1, the floats bracketing f.
    	f0 := math.Nextafter32(f, float32(math.Inf(-1)))
    	f1 := math.Nextafter32(f, float32(math.Inf(+1)))
    
    	// For f to be correct, r must be closer to f than to f0 or f1.
    	df := delta(r, float64(f))
    	df0 := delta(r, float64(f0))
    	df1 := delta(r, float64(f1))
    	if df.Cmp(df0) > 0 {
    		t.Errorf("Rat(%v).Float32() = %g (%b), but previous float32 %g (%b) is closer", r, f, f, f0, f0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 07 00:15:59 UTC 2022
    - 18.9K bytes
    - Viewed (0)
  5. src/math/big/floatconv_test.go

    		{"% 030.20f", "+1e-20", " 00000000.00000000000000000001"},
    
    		// erroneous formats
    		{"%s", 1.0, "%!s(*big.Float=1)"},
    	} {
    		value := new(Float)
    		switch v := test.value.(type) {
    		case float32:
    			value.SetPrec(24).SetFloat64(float64(v))
    		case float64:
    			value.SetPrec(53).SetFloat64(v)
    		case string:
    			value.SetPrec(512).Parse(v, 0)
    		default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 24.3K bytes
    - Viewed (0)
  6. src/strconv/atof.go

    	}
    	return f, n, err
    }
    
    // ParseFloat converts the string s to a floating-point number
    // with the precision specified by bitSize: 32 for float32, or 64 for float64.
    // When bitSize=32, the result still has type float64, but it will be
    // convertible to float32 without changing its value.
    //
    // ParseFloat accepts decimal and hexadecimal floating-point numbers
    // as defined by the Go syntax for [floating-point literals].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 06 18:50:50 UTC 2022
    - 15.9K bytes
    - Viewed (0)
  7. src/go/constant/value.go

    }
    
    // Float32Val is like [Float64Val] but for float32 instead of float64.
    func Float32Val(x Value) (float32, bool) {
    	switch x := x.(type) {
    	case int64Val:
    		f := float32(x)
    		return f, int64Val(f) == x
    	case intVal:
    		f, acc := newFloat().SetInt(x.val).Float32()
    		return f, acc == big.Exact
    	case ratVal:
    		return x.val.Float32()
    	case floatVal:
    		f, acc := x.val.Float32()
    		return f, acc == big.Exact
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/test/float_test.go

    	du64, du32, du16, du8 := float64(1<<63), float64(1<<31), float64(1<<15), float64(1<<7)
    	di64, di32, di16, di8 := float64(-1<<63), float64(-1<<31), float64(-1<<15), float64(-1<<7)
    	su64, su32, su16, su8 := float32(1<<63), float32(1<<31), float32(1<<15), float32(1<<7)
    	si64, si32, si16, si8 := float32(-1<<63), float32(-1<<31), float32(-1<<15), float32(-1<<7)
    
    	// integer to float
    	if float64(u64) != du64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 12.5K bytes
    - Viewed (0)
  9. src/reflect/abi.go

    }
    
    // floatFromReg loads a float value from its register representation in r.
    //
    // argSize must be 4 or 8.
    func floatFromReg(r *abi.RegArgs, reg int, argSize uintptr, to unsafe.Pointer) {
    	switch argSize {
    	case 4:
    		*(*float32)(to) = archFloat32FromReg(r.Floats[reg])
    	case 8:
    		*(*float64)(to) = *(*float64)(unsafe.Pointer(&r.Floats[reg]))
    	default:
    		panic("bad argSize")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:08:32 UTC 2024
    - 15K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/runtime/converter.go

    					dv.Set(sv.Convert(dt))
    					return nil
    				case reflect.Float32, reflect.Float64:
    					dv.Set(sv.Convert(dt))
    					return nil
    				}
    			case reflect.Float32, reflect.Float64:
    				switch dt.Kind() {
    				case reflect.Float32, reflect.Float64:
    					dv.Set(sv.Convert(dt))
    					return nil
    				}
    				if sv.Float() == math.Trunc(sv.Float()) {
    					dv.Set(sv.Convert(dt))
    					return nil
    				}
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 24.9K bytes
    - Viewed (0)
Back to top