Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for OverflowFloat (0.19 sec)

  1. doc/next/6-stdlib/99-minor/reflect/60427.md

    The new methods synonymous with the method of the same name
    in [Value] are added to [Type]:
    1. [Type.OverflowComplex]
    2. [Type.OverflowFloat]
    3. [Type.OverflowInt]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 20:57:18 UTC 2024
    - 187 bytes
    - Viewed (0)
  2. api/go1.23.txt

    pkg reflect, type Type interface, CanSeq() bool #66056
    pkg reflect, type Type interface, CanSeq2() bool #66056
    pkg reflect, type Type interface, OverflowComplex(complex128) bool #60427
    pkg reflect, type Type interface, OverflowFloat(float64) bool #60427
    pkg reflect, type Type interface, OverflowInt(int64) bool #60427
    pkg reflect, type Type interface, OverflowUint(uint64) bool #60427
    pkg runtime/debug, func SetCrashOutput(*os.File, CrashOptions) error #42888
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 20:48:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/inl_test.go

    			"Value.Float",
    			"Value.Int",
    			"Value.Interface",
    			"Value.IsNil",
    			"Value.IsValid",
    			"Value.Kind",
    			"Value.Len",
    			"Value.MapRange",
    			"Value.OverflowComplex",
    			"Value.OverflowFloat",
    			"Value.OverflowInt",
    			"Value.OverflowUint",
    			"Value.String",
    			"Value.Type",
    			"Value.Uint",
    			"Value.UnsafeAddr",
    			"Value.pointer",
    			"add",
    			"align",
    			"flag.mustBe",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  4. src/reflect/all_test.go

    	if ovf := V(float64(0)).OverflowFloat(1e300); ovf {
    		t.Errorf("%v wrongly overflows float64", 1e300)
    	}
    
    	maxFloat32 := float64((1<<24 - 1) << (127 - 23))
    	if ovf := V(float32(0)).OverflowFloat(maxFloat32); ovf {
    		t.Errorf("%v wrongly overflows float32", maxFloat32)
    	}
    	ovfFloat32 := float64((1<<24-1)<<(127-23) + 1<<(127-52))
    	if ovf := V(float32(0)).OverflowFloat(ovfFloat32); !ovf {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  5. src/reflect/type.go

    	// It panics if t's Kind is not Complex64 or Complex128.
    	OverflowComplex(x complex128) bool
    
    	// OverflowFloat reports whether the float64 x cannot be represented by type t.
    	// It panics if t's Kind is not Float32 or Float64.
    	OverflowFloat(x float64) bool
    
    	// OverflowInt reports whether the int64 x cannot be represented by type t.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  6. src/encoding/json/decode.go

    				break
    			}
    			v.SetUint(n)
    
    		case reflect.Float32, reflect.Float64:
    			n, err := strconv.ParseFloat(string(item), v.Type().Bits())
    			if err != nil || v.OverflowFloat(n) {
    				d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())})
    				break
    			}
    			v.SetFloat(n)
    		}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  7. src/reflect/value.go

    }
    
    // OverflowFloat reports whether the float64 x cannot be represented by v's type.
    // It panics if v's Kind is not [Float32] or [Float64].
    func (v Value) OverflowFloat(x float64) bool {
    	k := v.kind()
    	switch k {
    	case Float32:
    		return overflowFloat32(x)
    	case Float64:
    		return false
    	}
    	panic(&ValueError{"reflect.Value.OverflowFloat", v.kind()})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
Back to top