Average Error: 29.1 → 29.1
Time: 1.0s
Precision: binary64
Cost: 6976
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
\frac{2}{1 + e^{-2 \cdot x}} - 1
\frac{2}{1 + e^{-2 \cdot x}} - 1
(FPCore (x y) :precision binary64 (- (/ 2.0 (+ 1.0 (exp (* -2.0 x)))) 1.0))
(FPCore (x y) :precision binary64 (- (/ 2.0 (+ 1.0 (exp (* -2.0 x)))) 1.0))
double code(double x, double y) {
	return (2.0 / (1.0 + exp(-2.0 * x))) - 1.0;
}
double code(double x, double y) {
	return (2.0 / (1.0 + exp(-2.0 * x))) - 1.0;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.1

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

Reproduce

herbie shell --seed 2021042 
(FPCore (x y)
  :name "Logistic function from Lakshay Garg"
  :precision binary64
  (- (/ 2.0 (+ 1.0 (exp (* -2.0 x)))) 1.0))