Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for ABS (0.04 sec)

  1. src/time/time.go

    	// +3     +2      +1        0        -1     -2       -3
    	// the offset to Thursday
    	abs := t.abs()
    	d := Thursday - absWeekday(abs)
    	// handle Sunday
    	if d == 4 {
    		d = -3
    	}
    	// find the Thursday of the calendar week
    	abs += uint64(d) * secondsPerDay
    	year, _, _, yday := absDate(abs, false)
    	return year, yday/7 + 1
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 50.7K bytes
    - Viewed (0)
  2. src/math/big/int_test.go

    	"fmt"
    	"internal/testenv"
    	"math"
    	"math/rand"
    	"strconv"
    	"strings"
    	"testing"
    	"testing/quick"
    )
    
    func isNormalized(x *Int) bool {
    	if len(x.abs) == 0 {
    		return !x.neg
    	}
    	// len(x.abs) > 0
    	return x.abs[len(x.abs)-1] != 0
    }
    
    type funZZ func(z, x, y *Int) *Int
    type argZZ struct {
    	z, x, y *Int
    }
    
    var sumZZ = []argZZ{
    	{NewInt(0), NewInt(0), NewInt(0)},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

        //
        // We don't have a frac(x) primitive in XLA and computing it is tricky, but
        // because abs(sin(pi * x)) = abs(sin(pi * abs(x))), it's good enough for
        // our purposes to use abs(frac(x)) = abs(x) - floor(abs(x)).
        //
        // Furthermore, pi * abs(frac(x)) loses precision when abs(frac(x)) is close
        // to 1.  To remedy this, we can use the fact that sin(pi * x) in the domain
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  4. src/math/all_test.go

    		}
    	}
    }
    
    func TestAbs(t *testing.T) {
    	for i := 0; i < len(vf); i++ {
    		if f := Abs(vf[i]); fabs[i] != f {
    			t.Errorf("Abs(%g) = %g, want %g", vf[i], f, fabs[i])
    		}
    	}
    	for i := 0; i < len(vffabsSC); i++ {
    		if f := Abs(vffabsSC[i]); !alike(fabsSC[i], f) {
    			t.Errorf("Abs(%g) = %g, want %g", vffabsSC[i], f, fabsSC[i])
    		}
    	}
    }
    
    func TestDim(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 07 17:39:26 UTC 2023
    - 86.8K bytes
    - Viewed (0)
  5. src/time/format.go

    	}
    	return s
    }
    
    // GoString implements [fmt.GoStringer] and formats t to be printed in Go source
    // code.
    func (t Time) GoString() string {
    	abs := t.abs()
    	year, month, day, _ := absDate(abs, true)
    	hour, minute, second := absClock(abs)
    
    	buf := make([]byte, 0, len("time.Date(9999, time.September, 31, 23, 59, 59, 999999999, time.Local)"))
    	buf = append(buf, "time.Date("...)
    	buf = appendInt(buf, year, 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:28 UTC 2024
    - 49.3K bytes
    - Viewed (0)
  6. platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/ConfigurationCacheProblemReportingIntegrationTest.groovy

            given:
            file('provider.txt').text = 'provider'
            file('fis-path.txt').text = 'fis-path'
            file('fis-file.txt').text = 'fis-file'
            file('fis-abs.txt').text = 'fis-abs'
            buildFile '''
                providers.fileContents(layout.projectDirectory.file("provider.txt")).with { provider ->
                    println("provider = ${provider.asText.get()}")
                }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 56.7K bytes
    - Viewed (0)
  7. src/time/time_test.go

    const unixToZero = -978307200 + 63113904000
    
    // abs returns the absolute time stored in t, as seconds and nanoseconds.
    func abs(t Time) (sec, nsec int64) {
    	unix := t.Unix()
    	nano := t.Nanosecond()
    	return unix + unixToZero, int64(nano)
    }
    
    // absString returns abs as a decimal string.
    func absString(t Time) string {
    	sec, nsec := abs(t)
    	if sec < 0 {
    		sec = -sec
    		nsec = -nsec
    		if nsec < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset_test.go

    }
    
    func float64close(x, y float64) bool {
    	x0 := float64NaNTo0(x)
    	y0 := float64NaNTo0(y)
    	diff := math.Abs(x0 - y0)
    	den := math.Max(math.Abs(x0), math.Abs(y0))
    	return den == 0 || diff/den < 1e-10
    }
    
    func uint64max(a, b uint64) uint64 {
    	if b > a {
    		return b
    	}
    	return a
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 26 12:55:23 UTC 2023
    - 58.4K bytes
    - Viewed (0)
  9. src/testing/testing.go

    // This is known as "black box" testing.
    //
    //	package abs_test
    //
    //	import (
    //		"testing"
    //
    //		"path_to_pkg/abs"
    //	)
    //
    //	func TestAbs(t *testing.T) {
    //	    got := abs.Abs(-1)
    //	    if got != 1 {
    //	        t.Errorf("Abs(-1) = %d; want 1", got)
    //	    }
    //	}
    //
    // For more detail, run "go help test" and "go help testflag".
    //
    // # Benchmarks
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/tests/decompose_resource_ops.mlir

        // CHECK-DAG: %[[SIGN:.*]] = "tf.Sign"(%[[PROX]]) : (tensor<4xf32>) -> tensor<4xf32>
        // CHECK-DAG: %[[ABS:.*]] = "tf.Abs"(%[[PROX]]) : (tensor<4xf32>) -> tensor<4xf32>
        // CHECK-DAG: %[[SCALED_L1:.*]] = "tf.Mul"(%[[ADAGRAD_LR]], %[[L1]]) : (tensor<4xf32>, tensor<f32>) -> tensor<4xf32>
        // CHECK-DAG: %[[PROX_NEW:.*]] = "tf.Sub"(%[[ABS]], %[[SCALED_L1]]) : (tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 51.3K bytes
    - Viewed (0)
Back to top