Average Error: 0.0 → 0.0
Time: 1.7s
Precision: binary64
\[\frac{2}{e^{x} + e^{-x}}\]
\[\frac{2}{e^{x} + e^{-x}}\]
\frac{2}{e^{x} + e^{-x}}
\frac{2}{e^{x} + e^{-x}}
(FPCore (x) :precision binary64 (/ 2.0 (+ (exp x) (exp (- x)))))
(FPCore (x) :precision binary64 (/ 2.0 (+ (exp x) (exp (- x)))))
double code(double x) {
	return 2.0 / (exp(x) + exp(-x));
}
double code(double x) {
	return 2.0 / (exp(x) + exp(-x));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{2}{e^{x} + e^{-x}}\]
  2. Final simplification0.0

    \[\leadsto \frac{2}{e^{x} + e^{-x}}\]

Reproduce

herbie shell --seed 2020233 
(FPCore (x)
  :name "Hyperbolic secant"
  :precision binary64
  (/ 2.0 (+ (exp x) (exp (- x)))))