Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 1,328 for FLOAT64 (0.11 sec)

  1. src/cmd/compile/internal/test/testdata/sqrtConst_test.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"math"
    	"testing"
    )
    
    var tests = [...]struct {
    	name string
    	in   float64 // used for error messages, not an input
    	got  float64
    	want float64
    }{
    	{"sqrt0", 0, math.Sqrt(0), 0},
    	{"sqrt1", 1, math.Sqrt(1), 1},
    	{"sqrt2", 2, math.Sqrt(2), math.Sqrt2},
    	{"sqrt4", 4, math.Sqrt(4), 2},
    	{"sqrt100", 100, math.Sqrt(100), 10},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 1.3K bytes
    - Viewed (0)
  2. test/typeparam/issue50177.go

    	x.fn(0)
    }
    
    func caller1a(val int) {
    	type X struct {
    		fn func(float64) error
    	}
    
    	x := X{func(v float64) error { fmt.Println(v); return nil }}
    	x.fn(float64(3.2))
    }
    
    func caller1b(val int) {
    	type Y struct {
    		fn func(float64) error
    	}
    
    	X := Y{func(v float64) error { fmt.Println(v); return nil }}
    	X.fn(float64(3.2))
    }
    
    // Test that local generic types within different if clauses don't conflict.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 2K bytes
    - Viewed (0)
  3. src/math/floor_s390x.s

    #include "textflag.h"
    
    // func archFloor(x float64) float64
    TEXT ·archFloor(SB),NOSPLIT,$0
    	FMOVD	x+0(FP), F0
    	FIDBR	$7, F0, F0
    	FMOVD	F0, ret+8(FP)
    	RET
    
    // func archCeil(x float64) float64
    TEXT ·archCeil(SB),NOSPLIT,$0
    	FMOVD	x+0(FP), F0
    	FIDBR	$6, F0, F0
    	FMOVD	F0, ret+8(FP)
    	RET
    
    // func archTrunc(x float64) float64
    TEXT ·archTrunc(SB),NOSPLIT,$0
    	FMOVD	x+0(FP), F0
    	FIDBR	$5, F0, F0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 15 15:48:19 UTC 2021
    - 579 bytes
    - Viewed (0)
  4. src/math/dim_noasm.go

    //go:build !amd64 && !arm64 && !riscv64 && !s390x
    
    package math
    
    const haveArchMax = false
    
    func archMax(x, y float64) float64 {
    	panic("not implemented")
    }
    
    const haveArchMin = false
    
    func archMin(x, y float64) float64 {
    	panic("not implemented")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 410 bytes
    - Viewed (0)
  5. src/runtime/fastlog2.go

    // to scale linearly between them.
    func fastlog2(x float64) float64 {
    	const fastlogScaleBits = 20
    	const fastlogScaleRatio = 1.0 / (1 << fastlogScaleBits)
    
    	xBits := float64bits(x)
    	// Extract the exponent from the IEEE float64, and index a constant
    	// table with the first 10 bits from the mantissa.
    	xExp := int64((xBits>>52)&0x7FF) - 1023
    	xManIndex := (xBits >> (52 - fastlogNumBits)) % (1 << fastlogNumBits)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 15 22:45:17 UTC 2017
    - 1.2K bytes
    - Viewed (0)
  6. pkg/test/loadbalancersim/loadbalancer/leastrequest.go

    	lb.doRequest(selected, onDone)
    }
    
    func (lb *weightedLeastRequest) calcEDFWeight(_ float64, value any) float64 {
    	conn := value.(*WeightedConnection)
    
    	weight := float64(conn.Weight)
    	if lb.activeRequestBias >= 1.0 {
    		weight /= float64(conn.ActiveRequests() + 1)
    	} else if lb.activeRequestBias > 0.0 {
    		weight /= math.Pow(float64(conn.ActiveRequests()+1), lb.activeRequestBias)
    	}
    	return weight
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 14 20:23:34 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  7. src/math/floor_386.s

    // Copyright 2010 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    #include "textflag.h"
    
    // func archCeil(x float64) float64
    TEXT ·archCeil(SB),NOSPLIT,$0
    	FMOVD   x+0(FP), F0  // F0=x
    	FSTCW   -2(SP)       // save old Control Word
    	MOVW    -2(SP), AX
    	ANDW    $0xf3ff, AX
    	ORW     $0x0800, AX  // Rounding Control set to +Inf
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 15 15:48:19 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  8. src/math/logb.go

    //
    // Special cases are:
    //
    //	Logb(±Inf) = +Inf
    //	Logb(0) = -Inf
    //	Logb(NaN) = NaN
    func Logb(x float64) float64 {
    	// special cases
    	switch {
    	case x == 0:
    		return Inf(-1)
    	case IsInf(x, 0):
    		return Inf(1)
    	case IsNaN(x):
    		return x
    	}
    	return float64(ilogb(x))
    }
    
    // Ilogb returns the binary exponent of x as an integer.
    //
    // Special cases are:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 07 19:46:45 UTC 2022
    - 1021 bytes
    - Viewed (0)
  9. test/typeparam/sum.go

    package main
    
    import (
    	"fmt"
    )
    
    func Sum[T interface{ int | float64 }](vec []T) T {
    	var sum T
    	for _, elt := range vec {
    		sum = sum + elt
    	}
    	return sum
    }
    
    func Abs(f float64) float64 {
    	if f < 0.0 {
    		return -f
    	}
    	return f
    }
    
    func main() {
    	vec1 := []int{3, 4}
    	vec2 := []float64{5.8, 9.6}
    	got := Sum[int](vec1)
    	want := vec1[0] + vec1[1]
    	if got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 923 bytes
    - Viewed (0)
  10. test/nilptr5_wasm.go

    // license that can be found in the LICENSE file.
    
    // Test that nil checks are removed.
    // Optimization is enabled.
    
    package p
    
    func f5(p *float32, q *float64, r *float32, s *float64) float64 {
    	x := float64(*p) // ERROR "generated nil check"
    	y := *q          // ERROR "generated nil check"
    	*r = 7           // ERROR "generated nil check"
    	*s = 9           // ERROR "generated nil check"
    	return x + y
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 813 bytes
    - Viewed (0)
Back to top