- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 2,057 for float2 (0.41 sec)
-
src/encoding/gob/codec_test.go
t.Errorf("uint64 a = %v not 17", data) } } // float32 { var data float32 instr := &decInstr{decFloat32, 6, nil, ovfl} state := newDecodeStateFromData(floatResult) execDec(instr, state, t, reflect.ValueOf(&data)) if data != 17 { t.Errorf("float32 a = %v not 17", data) } } // float64 { var data float64 instr := &decInstr{decFloat64, 6, nil, ovfl}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Aug 19 23:03:14 UTC 2023 - 36.9K bytes - Viewed (0) -
test/typeparam/double.go
package main import ( "fmt" "reflect" ) type Number interface { ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~float32 | ~float64 } type MySlice []int type MyFloatSlice []float64 type _SliceOf[E any] interface { ~[]E } func _DoubleElems[S _SliceOf[E], E Number](s S) S { r := make(S, len(s)) for i, v := range s { r[i] = v + v }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 1.5K bytes - Viewed (0) -
test/fixedbugs/issue7316.go
import "fmt" const tpl = ` func init() { var i %s j := %s(i) _ = %s(j) } ` func main() { fmt.Println("package main") ntypes := []string{ "byte", "rune", "uintptr", "float32", "float64", "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", } for i, from := range ntypes { for _, to := range ntypes[i:] { fmt.Printf(tpl, from, to, from) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 777 bytes - Viewed (0) -
src/internal/types/testdata/check/builtins0.go
// maps _ = make /* ERROR "arguments" */ (map[int]string, 10, 20) _ = make(map[int]float32, int /* ERROR "not an expression" */) _ = make(map[int]float32, "foo" /* ERROR "cannot convert" */) _ = make(map[int]float32, 10) _ = make(map[int]float32, n) _ = make(map[int]float32, int64(n)) _ = make(map[string]bool, 10.0) _ = make(map[string]bool, 10.0<<s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.3K bytes - Viewed (0) -
src/fmt/fmt_test.go
{"%#v", []int32(nil), "[]int32(nil)"}, {"%#v", 1.2345678, "1.2345678"}, {"%#v", float32(1.2345678), "1.2345678"}, // Whole number floats are printed without decimals. See Issue 27634. {"%#v", 1.0, "1"}, {"%#v", 1000000.0, "1e+06"}, {"%#v", float32(1.0), "1"}, {"%#v", float32(1000000.0), "1e+06"}, // Only print []byte and []uint8 as type []byte if they appear at the top level.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:31:55 UTC 2024 - 58.6K bytes - Viewed (0) -
pkg/env/var_test.go
runTest(t, "int32", int32(123), "789", 789) runTest(t, "bool", false, "true", true) runTest(t, "duration", time.Second, "1m", time.Minute) runTest(t, "float64", float64(1.5), "2.5", float64(2.5)) runTest(t, "float32", float32(1.5), "2.5", float32(2.5)) runTest(t, "complex", test{A: "2"}, `{"a":"3"}`, test{A: "3"}) } func TestInt(t *testing.T) { reset() ev := RegisterIntVar(testVar, 123, "")
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 08 16:43:05 UTC 2023 - 8.1K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/impl/iostream_test.cc
namespace impl { TEST(OStreamTest, TestInt64) { Int64 x(42); std::stringstream stream; stream << x; ASSERT_EQ(stream.str(), "42"); } TEST(OStreamTest, TestFloat32) { Float32 x(0.375); // Exactly representable as a float. std::stringstream stream; stream << x; ASSERT_EQ(stream.str(), "0.375"); } TEST(OStreamTest, TestString) { String s("foo"); std::stringstream stream; stream << s;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 18 09:47:46 UTC 2024 - 2K bytes - Viewed (0) -
src/cmd/compile/internal/ir/const.go
// Maximum size in bits for big.Ints before signaling // overflow and also mantissa precision for big.Floats. ConstPrec = 512 ) func BigFloat(v constant.Value) *big.Float { f := new(big.Float) f.SetPrec(ConstPrec) switch u := constant.Val(v).(type) { case int64: f.SetInt64(u) case *big.Int: f.SetInt(u) case *big.Float: f.Set(u) case *big.Rat: f.SetRat(u) default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 18:53:26 UTC 2023 - 4K bytes - Viewed (0) -
src/testing/quick/quick_test.go
type TestBoolAlias bool func fBoolAlias(a TestBoolAlias) TestBoolAlias { return a } func fFloat32(a float32) float32 { return a } type TestFloat32Alias float32 func fFloat32Alias(a TestFloat32Alias) TestFloat32Alias { return a } func fFloat64(a float64) float64 { return a } type TestFloat64Alias float64 func fFloat64Alias(a TestFloat64Alias) TestFloat64Alias { return a }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 12:54:00 UTC 2019 - 9K bytes - Viewed (0) -
internal/s3select/sql/parser.go
Timestamp2 *PrimaryTerm `parser:" @@ \")\" "` } // LitValue represents a literal value parsed from the sql type LitValue struct { Float *float64 `parser:"( @Float"` Int *float64 `parser:" | @Int"` // To avoid value out of range, use float64 instead String *LiteralString `parser:" | @LitString"` Boolean *Boolean `parser:" | @(\"TRUE\" | \"FALSE\")"` Null bool `parser:" | @\"NULL\""`
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 12.9K bytes - Viewed (0)