Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for Atof64 (0.27 sec)

  1. test/fixedbugs/bug120.go

    		v := strconv.FormatFloat(t.f, 'g', -1, 64)
    		if v != t.out {
    			println("Bad float64 const:", t.in, "want", t.out, "got", v)
    			x, err := strconv.ParseFloat(t.out, 64)
    			if err != nil {
    				println("bug120: strconv.Atof64", t.out)
    				panic("fail")
    			}
    			println("\twant exact:", strconv.FormatFloat(x, 'g', 1000, 64))
    			println("\tgot exact: ", strconv.FormatFloat(t.f, 'g', 1000, 64))
    			ok = false
    		}
    	}
    	if !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 18 21:15:42 UTC 2012
    - 1.8K bytes
    - Viewed (0)
  2. src/strconv/fp_test.go

    			continue
    		}
    		var s string
    		var v float64
    		switch a[0] {
    		case "float64":
    			var ok bool
    			v, ok = myatof64(a[2])
    			if !ok {
    				t.Error("testdata/testfp.txt:", lineno, ": cannot atof64 ", a[2])
    				continue
    			}
    			s = fmt.Sprintf(a[1], v)
    		case "float32":
    			v1, ok := myatof32(a[2])
    			if !ok {
    				t.Error("testdata/testfp.txt:", lineno, ": cannot atof32 ", a[2])
    				continue
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 06 15:53:04 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  3. src/strconv/atof.go

    		return 0, n, syntaxError(fnParseFloat, s)
    	}
    	b, ovf := d.floatBits(&float32info)
    	f = math.Float32frombits(uint32(b))
    	if ovf {
    		err = rangeError(fnParseFloat, s)
    	}
    	return f, n, err
    }
    
    func atof64(s string) (f float64, n int, err error) {
    	if val, n, ok := special(s); ok {
    		return val, n, nil
    	}
    
    	mantissa, exp, neg, trunc, hex, n, ok := readFloat(s)
    	if !ok {
    		return 0, n, syntaxError(fnParseFloat, s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 06 18:50:50 UTC 2022
    - 15.9K bytes
    - Viewed (0)
  4. src/runtime/string.go

    	}
    
    	return n, true
    }
    
    // atoi is like atoi64 but for integers
    // that fit into an int.
    func atoi(s string) (int, bool) {
    	if n, ok := atoi64(s); n == int64(int(n)) {
    		return int(n), ok
    	}
    	return 0, false
    }
    
    // atoi32 is like atoi but for integers
    // that fit into an int32.
    func atoi32(s string) (int32, bool) {
    	if n, ok := atoi64(s); n == int64(int32(n)) {
    		return int32(n), ok
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  5. test/ken/convert.go

    	{ tf32, tf32, 10 }, { tf32, tf64, 10 },
    
    	{ tf64, ti8,  10 }, { tf64, tu8,  10 }, { tf64, ti16, 10 }, { tf64, tu16, 10 },
    	{ tf64, ti32, 10 }, { tf64, tu32, 10 }, { tf64, ti64, 10 }, { tf64, tu64, 10 },
    	{ tf64, tf32, 10 }, { tf64, tf64, 10 },
    
    	/* value good in all signed types (-4) */
    	{ ti8,  ti8,  -4 }, { ti8,  ti16, -4 },
    	{ ti8,  ti32, -4 }, { ti8,  ti64, -4 },
    	{ ti8,  tf32, -4 }, { ti8,  tf64, -4 },
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 14.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/Wasm.rules

    (Lsh64x(32|16|8) [c] x y) => (Lsh64x64 [c] x (ZeroExt(32|16|8)to64 y))
    
    (Lsh32x64 ...) => (Lsh64x64 ...)
    (Lsh32x(32|16|8) [c] x y) => (Lsh64x64 [c] x (ZeroExt(32|16|8)to64 y))
    
    (Lsh16x64 ...) => (Lsh64x64 ...)
    (Lsh16x(32|16|8) [c] x y) => (Lsh64x64 [c] x (ZeroExt(32|16|8)to64 y))
    
    (Lsh8x64 ...) => (Lsh64x64 ...)
    (Lsh8x(32|16|8) [c] x y) => (Lsh64x64 [c] x (ZeroExt(32|16|8)to64 y))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 03:56:57 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  7. src/fmt/stringer_test.go

    type TI8 int8
    type TI16 int16
    type TI32 int32
    type TI64 int64
    type TU uint
    type TU8 uint8
    type TU16 uint16
    type TU32 uint32
    type TU64 uint64
    type TUI uintptr
    type TF float64
    type TF32 float32
    type TF64 float64
    type TB bool
    type TS string
    
    func (v TI) String() string   { return Sprintf("I: %d", int(v)) }
    func (v TI8) String() string  { return Sprintf("I8: %d", int8(v)) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 2.1K bytes
    - Viewed (0)
  8. src/debug/dwarf/typeunit.go

    			return err
    		}
    		asize := b.uint8()
    		sig := b.uint64()
    
    		var toff uint32
    		if !dwarf64 {
    			toff = b.uint32()
    		} else {
    			to64 := b.uint64()
    			if to64 != uint64(uint32(to64)) {
    				b.error("type unit type offset overflow")
    				return b.err
    			}
    			toff = uint32(to64)
    		}
    
    		boff := b.off
    		d.typeSigs[sig] = &typeUnit{
    			unit: unit{
    				base:   base,
    				off:    boff,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  9. src/runtime/softfloat64_test.go

    		for _, g := range all {
    			h := hw(f, g)
    			s := sw(f, g)
    			if !same(h, s) {
    				err(t, "%g %s %g = sw %g, hw %g\n", f, op, g, s, h)
    			}
    			testu(t, "to32", trunc32, to32sw, h)
    			testu(t, "to64", trunc32, to64sw, h)
    			testu(t, "toint64", hwint64, toint64sw, h)
    			testu(t, "fromint64", hwint64, fromint64sw, h)
    			testcmp(t, f, h)
    			testcmp(t, h, f)
    			testcmp(t, g, h)
    			testcmp(t, h, g)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 4K bytes
    - Viewed (0)
Back to top