Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for sinhcosh (0.13 sec)

  1. src/math/cmplx/sin.go

    			return complex(math.Inf(1), math.NaN())
    		}
    	case im == 0 && math.IsNaN(re):
    		return complex(math.NaN(), im)
    	}
    	s, c := math.Sincos(imag(x))
    	sh, ch := sinhcosh(real(x))
    	return complex(c*ch, s*sh)
    }
    
    // calculate sinh and cosh.
    func sinhcosh(x float64) (sh, ch float64) {
    	if math.Abs(x) <= 0.5 {
    		return math.Sinh(x), math.Cosh(x)
    	}
    	e := math.Exp(x)
    	ei := 0.5 / e
    	e *= 0.5
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  2. src/math/huge_test.go

    	for i := 0; i < len(trigHuge); i++ {
    		f1, g1 := sinHuge[i], cosHuge[i]
    		f2, g2 := Sincos(trigHuge[i])
    		if !close(f1, f2) || !close(g1, g2) {
    			t.Errorf("Sincos(%g) = %g, %g, want %g, %g", trigHuge[i], f2, g2, f1, g1)
    		}
    		f3, g3 := Sincos(-trigHuge[i])
    		if !close(-f1, f3) || !close(g1, g3) {
    			t.Errorf("Sincos(%g) = %g, %g, want %g, %g", -trigHuge[i], f3, g3, -f1, g1)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 16:23:41 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  3. src/math/cmplx/pow.go

    		return complex(0, 0)
    	}
    	r := math.Pow(modulus, real(y))
    	arg := Phase(x)
    	theta := real(y) * arg
    	if imag(y) != 0 {
    		r *= math.Exp(-imag(y) * arg)
    		theta += imag(y) * math.Log(modulus)
    	}
    	s, c := math.Sincos(theta)
    	return complex(r*c, r*s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 2.3K bytes
    - Viewed (0)
Back to top