Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 62 for ctanh (0.31 sec)

  1. src/math/cmplx/tan.go

    // series near these points.
    //
    // ctan(z) = -i ctanh(iz).
    //
    // ACCURACY:
    //
    //                      Relative error:
    // arithmetic   domain     # trials      peak         rms
    //    DEC       -10,+10      5200       7.1e-17     1.6e-17
    //    IEEE      -10,+10     30000       7.2e-16     1.2e-16
    // Also tested by ctan * ccot = 1 and catan(ctan(z))  =  z.
    
    // Tan returns the tangent of x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 8.5K bytes
    - Viewed (0)
  2. src/math/atanh.go

    //
    
    // Atanh returns the inverse hyperbolic tangent of x.
    //
    // Special cases are:
    //
    //	Atanh(1) = +Inf
    //	Atanh(±0) = ±0
    //	Atanh(-1) = -Inf
    //	Atanh(x) = NaN if x < -1 or x > 1
    //	Atanh(NaN) = NaN
    func Atanh(x float64) float64 {
    	if haveArchAtanh {
    		return archAtanh(x)
    	}
    	return atanh(x)
    }
    
    func atanh(x float64) float64 {
    	const NearZero = 1.0 / (1 << 28) // 2**-28
    	// special cases
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2K bytes
    - Viewed (0)
  3. src/math/tanh.go

    	1.12811678491632931402e2,
    	2.23548839060100448583e3,
    	4.84406305325125486048e3,
    }
    
    // Tanh returns the hyperbolic tangent of x.
    //
    // Special cases are:
    //
    //	Tanh(±0) = ±0
    //	Tanh(±Inf) = ±1
    //	Tanh(NaN) = NaN
    func Tanh(x float64) float64 {
    	if haveArchTanh {
    		return archTanh(x)
    	}
    	return tanh(x)
    }
    
    func tanh(x float64) float64 {
    	const MAXLOG = 8.8029691931113054295988e+01 // log(2**127)
    	z := Abs(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  4. src/math/cmplx/asin.go

    	t = imag(x) - 1
    	b := x2 + t*t
    	if b == 0 {
    		return NaN()
    	}
    	t = imag(x) + 1
    	c := (x2 + t*t) / b
    	return complex(w, 0.25*math.Log(c))
    }
    
    // Atanh returns the inverse hyperbolic tangent of x.
    func Atanh(x complex128) complex128 {
    	z := complex(-imag(x), real(x)) // z = i * x
    	z = Atan(z)
    	return complex(imag(z), -real(z)) // z = -i * z
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 5.9K bytes
    - Viewed (0)
  5. src/math/cmplx/cmath_test.go

    		}
    	}
    }
    func TestAtanh(t *testing.T) {
    	for i := 0; i < len(vc); i++ {
    		if f := Atanh(vc[i]); !cVeryclose(atanh[i], f) {
    			t.Errorf("Atanh(%g) = %g, want %g", vc[i], f, atanh[i])
    		}
    	}
    	for _, v := range atanhSC {
    		if f := Atanh(v.in); !cAlike(v.want, f) {
    			t.Errorf("Atanh(%g) = %g, want %g", v.in, f, v.want)
    		}
    		if math.IsNaN(imag(v.in)) || math.IsNaN(imag(v.want)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 48.1K bytes
    - Viewed (0)
  6. src/math/export_s390x_test.go

    package math
    
    // Export internal functions and variable for testing.
    var Log10NoVec = log10
    var CosNoVec = cos
    var CoshNoVec = cosh
    var SinNoVec = sin
    var SinhNoVec = sinh
    var TanhNoVec = tanh
    var Log1pNovec = log1p
    var AtanhNovec = atanh
    var AcosNovec = acos
    var AcoshNovec = acosh
    var AsinNovec = asin
    var AsinhNovec = asinh
    var ErfNovec = erf
    var ErfcNovec = erfc
    var AtanNovec = atan
    var Atan2Novec = atan2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 08 19:52:30 UTC 2017
    - 732 bytes
    - Viewed (0)
  7. src/math/arith_s390x_test.go

    	}
    	for i := 0; i < len(vf); i++ {
    		a := vf[i] / 10
    		if f := AtanhNovec(a); !veryclose(atanh[i], f) {
    			t.Errorf("Atanh(%g) = %g, want %g", a, f, atanh[i])
    		}
    	}
    	for i := 0; i < len(vfatanhSC); i++ {
    		if f := AtanhNovec(vfatanhSC[i]); !alike(atanhSC[i], f) {
    			t.Errorf("Atanh(%g) = %g, want %g", vfatanhSC[i], f, atanhSC[i])
    		}
    	}
    }
    
    func TestAcosNovec(t *testing.T) {
    	if !HasVX {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 08 19:52:30 UTC 2017
    - 10.8K bytes
    - Viewed (0)
  8. tensorflow/cc/gradients/math_grad_test.cc

            break;
          case COSH:
            y = Cosh(scope_, x);
            break;
          case TANH:
            y = Tanh(scope_, x);
            break;
          case ASINH:
            y = Asinh(scope_, x);
            break;
          case ACOSH:
            y = Acosh(scope_, x);
            break;
          case ATANH:
            y = Atanh(scope_, x);
            break;
          case SIGMOID:
            y = Sigmoid(scope_, x);
            break;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 25 18:20:20 UTC 2023
    - 36K bytes
    - Viewed (0)
  9. src/math/example_test.go

    func ExampleAtan() {
    	fmt.Printf("%.2f", math.Atan(0))
    	// Output: 0.00
    }
    
    func ExampleAtan2() {
    	fmt.Printf("%.2f", math.Atan2(0, 0))
    	// Output: 0.00
    }
    
    func ExampleAtanh() {
    	fmt.Printf("%.2f", math.Atanh(0))
    	// Output: 0.00
    }
    
    func ExampleCopysign() {
    	fmt.Printf("%.2f", math.Copysign(3.2, -1))
    	// Output: -3.20
    }
    
    func ExampleCos() {
    	fmt.Printf("%.2f", math.Cos(math.Pi/2))
    	// Output: 0.00
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 07 18:09:53 UTC 2021
    - 3.7K bytes
    - Viewed (0)
  10. src/math/all_test.go

    }
    
    func TestAtanh(t *testing.T) {
    	for i := 0; i < len(vf); i++ {
    		a := vf[i] / 10
    		if f := Atanh(a); !veryclose(atanh[i], f) {
    			t.Errorf("Atanh(%g) = %g, want %g", a, f, atanh[i])
    		}
    	}
    	for i := 0; i < len(vfatanhSC); i++ {
    		if f := Atanh(vfatanhSC[i]); !alike(atanhSC[i], f) {
    			t.Errorf("Atanh(%g) = %g, want %g", vfatanhSC[i], f, atanhSC[i])
    		}
    	}
    }
    
    func TestAtan2(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)
Back to top