
(FPCore (x s) :precision binary32 (/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
float code(float x, float s) {
return 1.0f / (1.0f + expf((-x / s)));
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
code = 1.0e0 / (1.0e0 + exp((-x / s)))
end function
function code(x, s) return Float32(Float32(1.0) / Float32(Float32(1.0) + exp(Float32(Float32(-x) / s)))) end
function tmp = code(x, s) tmp = single(1.0) / (single(1.0) + exp((-x / s))); end
\begin{array}{l}
\\
\frac{1}{1 + e^{\frac{-x}{s}}}
\end{array}
Sampling outcomes in binary32 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x s) :precision binary32 (/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
float code(float x, float s) {
return 1.0f / (1.0f + expf((-x / s)));
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
code = 1.0e0 / (1.0e0 + exp((-x / s)))
end function
function code(x, s) return Float32(Float32(1.0) / Float32(Float32(1.0) + exp(Float32(Float32(-x) / s)))) end
function tmp = code(x, s) tmp = single(1.0) / (single(1.0) + exp((-x / s))); end
\begin{array}{l}
\\
\frac{1}{1 + e^{\frac{-x}{s}}}
\end{array}
(FPCore (x s) :precision binary32 (/ 1.0 (+ 1.0 (pow (sqrt (exp -1.0)) (* (/ x s) 2.0)))))
float code(float x, float s) {
return 1.0f / (1.0f + powf(sqrtf(expf(-1.0f)), ((x / s) * 2.0f)));
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
code = 1.0e0 / (1.0e0 + (sqrt(exp((-1.0e0))) ** ((x / s) * 2.0e0)))
end function
function code(x, s) return Float32(Float32(1.0) / Float32(Float32(1.0) + (sqrt(exp(Float32(-1.0))) ^ Float32(Float32(x / s) * Float32(2.0))))) end
function tmp = code(x, s) tmp = single(1.0) / (single(1.0) + (sqrt(exp(single(-1.0))) ^ ((x / s) * single(2.0)))); end
\begin{array}{l}
\\
\frac{1}{1 + {\left(\sqrt{e^{-1}}\right)}^{\left(\frac{x}{s} \cdot 2\right)}}
\end{array}
Initial program 99.8%
distribute-frac-neg99.8%
exp-neg99.8%
Applied egg-rr99.8%
add-exp-log99.8%
inv-pow99.8%
log-pow99.8%
add-log-exp99.8%
pow-exp99.8%
add-sqr-sqrt99.8%
unpow-prod-down99.8%
Applied egg-rr99.8%
pow-sqr99.8%
count-299.8%
*-rgt-identity99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x s) :precision binary32 (/ 1.0 (+ 1.0 (pow (exp -2.0) (* (/ x s) 0.5)))))
float code(float x, float s) {
return 1.0f / (1.0f + powf(expf(-2.0f), ((x / s) * 0.5f)));
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
code = 1.0e0 / (1.0e0 + (exp((-2.0e0)) ** ((x / s) * 0.5e0)))
end function
function code(x, s) return Float32(Float32(1.0) / Float32(Float32(1.0) + (exp(Float32(-2.0)) ^ Float32(Float32(x / s) * Float32(0.5))))) end
function tmp = code(x, s) tmp = single(1.0) / (single(1.0) + (exp(single(-2.0)) ^ ((x / s) * single(0.5)))); end
\begin{array}{l}
\\
\frac{1}{1 + {\left(e^{-2}\right)}^{\left(\frac{x}{s} \cdot 0.5\right)}}
\end{array}
Initial program 99.8%
distribute-frac-neg99.8%
exp-neg99.8%
Applied egg-rr99.8%
add-exp-log99.8%
inv-pow99.8%
log-pow99.8%
add-log-exp99.8%
pow-exp99.8%
sqr-pow99.8%
pow-prod-down99.7%
prod-exp99.8%
metadata-eval99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x s) :precision binary32 (/ 1.0 (+ 1.0 (/ 1.0 (exp (/ x s))))))
float code(float x, float s) {
return 1.0f / (1.0f + (1.0f / expf((x / s))));
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
code = 1.0e0 / (1.0e0 + (1.0e0 / exp((x / s))))
end function
function code(x, s) return Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(Float32(1.0) / exp(Float32(x / s))))) end
function tmp = code(x, s) tmp = single(1.0) / (single(1.0) + (single(1.0) / exp((x / s)))); end
\begin{array}{l}
\\
\frac{1}{1 + \frac{1}{e^{\frac{x}{s}}}}
\end{array}
Initial program 99.8%
distribute-frac-neg99.8%
exp-neg99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x s) :precision binary32 (/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
float code(float x, float s) {
return 1.0f / (1.0f + expf((-x / s)));
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
code = 1.0e0 / (1.0e0 + exp((-x / s)))
end function
function code(x, s) return Float32(Float32(1.0) / Float32(Float32(1.0) + exp(Float32(Float32(-x) / s)))) end
function tmp = code(x, s) tmp = single(1.0) / (single(1.0) + exp((-x / s))); end
\begin{array}{l}
\\
\frac{1}{1 + e^{\frac{-x}{s}}}
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x s) :precision binary32 (if (<= x -8.999999840607448e-23) (/ 1.0 (+ 2.0 (- (* 0.5 (* (* x x) (/ 1.0 (* s s)))) (/ x s)))) (/ 1.0 (+ 1.0 (/ 1.0 (+ 1.0 (/ x s)))))))
float code(float x, float s) {
float tmp;
if (x <= -8.999999840607448e-23f) {
tmp = 1.0f / (2.0f + ((0.5f * ((x * x) * (1.0f / (s * s)))) - (x / s)));
} else {
tmp = 1.0f / (1.0f + (1.0f / (1.0f + (x / s))));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-8.999999840607448e-23)) then
tmp = 1.0e0 / (2.0e0 + ((0.5e0 * ((x * x) * (1.0e0 / (s * s)))) - (x / s)))
else
tmp = 1.0e0 / (1.0e0 + (1.0e0 / (1.0e0 + (x / s))))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-8.999999840607448e-23)) tmp = Float32(Float32(1.0) / Float32(Float32(2.0) + Float32(Float32(Float32(0.5) * Float32(Float32(x * x) * Float32(Float32(1.0) / Float32(s * s)))) - Float32(x / s)))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(x / s))))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-8.999999840607448e-23)) tmp = single(1.0) / (single(2.0) + ((single(0.5) * ((x * x) * (single(1.0) / (s * s)))) - (x / s))); else tmp = single(1.0) / (single(1.0) + (single(1.0) / (single(1.0) + (x / s)))); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.999999840607448 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{2 + \left(0.5 \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{s \cdot s}\right) - \frac{x}{s}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{1}{1 + \frac{x}{s}}}\\
\end{array}
\end{array}
if x < -8.99999984e-23Initial program 99.6%
Taylor expanded in x around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
unpow280.5%
unpow280.5%
times-frac75.6%
Simplified75.6%
frac-times80.5%
Applied egg-rr80.5%
div-inv81.1%
Applied egg-rr81.1%
if -8.99999984e-23 < x Initial program 99.9%
distribute-frac-neg99.9%
exp-neg99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 90.7%
Final simplification86.7%
(FPCore (x s) :precision binary32 (if (<= x -8.999999840607448e-23) (/ 1.0 (+ 2.0 (- (* 0.5 (/ (* x x) (* s s))) (/ x s)))) (/ 1.0 (+ 1.0 (/ 1.0 (+ 1.0 (/ x s)))))))
float code(float x, float s) {
float tmp;
if (x <= -8.999999840607448e-23f) {
tmp = 1.0f / (2.0f + ((0.5f * ((x * x) / (s * s))) - (x / s)));
} else {
tmp = 1.0f / (1.0f + (1.0f / (1.0f + (x / s))));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-8.999999840607448e-23)) then
tmp = 1.0e0 / (2.0e0 + ((0.5e0 * ((x * x) / (s * s))) - (x / s)))
else
tmp = 1.0e0 / (1.0e0 + (1.0e0 / (1.0e0 + (x / s))))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-8.999999840607448e-23)) tmp = Float32(Float32(1.0) / Float32(Float32(2.0) + Float32(Float32(Float32(0.5) * Float32(Float32(x * x) / Float32(s * s))) - Float32(x / s)))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(x / s))))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-8.999999840607448e-23)) tmp = single(1.0) / (single(2.0) + ((single(0.5) * ((x * x) / (s * s))) - (x / s))); else tmp = single(1.0) / (single(1.0) + (single(1.0) / (single(1.0) + (x / s)))); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.999999840607448 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{2 + \left(0.5 \cdot \frac{x \cdot x}{s \cdot s} - \frac{x}{s}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{1}{1 + \frac{x}{s}}}\\
\end{array}
\end{array}
if x < -8.99999984e-23Initial program 99.6%
Taylor expanded in x around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
unpow280.5%
unpow280.5%
times-frac75.6%
Simplified75.6%
frac-times80.5%
Applied egg-rr80.5%
if -8.99999984e-23 < x Initial program 99.9%
distribute-frac-neg99.9%
exp-neg99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 90.7%
Final simplification86.5%
(FPCore (x s) :precision binary32 (if (<= x -8.999999840607448e-23) (/ 1.0 (+ 2.0 (- (/ 0.5 (/ (* s s) (* x x))) (/ x s)))) (/ 1.0 (+ 1.0 (/ 1.0 (+ 1.0 (/ x s)))))))
float code(float x, float s) {
float tmp;
if (x <= -8.999999840607448e-23f) {
tmp = 1.0f / (2.0f + ((0.5f / ((s * s) / (x * x))) - (x / s)));
} else {
tmp = 1.0f / (1.0f + (1.0f / (1.0f + (x / s))));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-8.999999840607448e-23)) then
tmp = 1.0e0 / (2.0e0 + ((0.5e0 / ((s * s) / (x * x))) - (x / s)))
else
tmp = 1.0e0 / (1.0e0 + (1.0e0 / (1.0e0 + (x / s))))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-8.999999840607448e-23)) tmp = Float32(Float32(1.0) / Float32(Float32(2.0) + Float32(Float32(Float32(0.5) / Float32(Float32(s * s) / Float32(x * x))) - Float32(x / s)))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(x / s))))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-8.999999840607448e-23)) tmp = single(1.0) / (single(2.0) + ((single(0.5) / ((s * s) / (x * x))) - (x / s))); else tmp = single(1.0) / (single(1.0) + (single(1.0) / (single(1.0) + (x / s)))); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.999999840607448 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{2 + \left(\frac{0.5}{\frac{s \cdot s}{x \cdot x}} - \frac{x}{s}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{1}{1 + \frac{x}{s}}}\\
\end{array}
\end{array}
if x < -8.99999984e-23Initial program 99.6%
Taylor expanded in x around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
unpow280.5%
unpow280.5%
times-frac75.6%
Simplified75.6%
associate-*r*75.0%
clear-num75.0%
un-div-inv75.0%
Applied egg-rr75.0%
associate-/l*75.0%
associate-/r*75.0%
associate-*r/75.0%
unpow275.0%
associate-/l*80.5%
unpow280.5%
Simplified80.5%
if -8.99999984e-23 < x Initial program 99.9%
distribute-frac-neg99.9%
exp-neg99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 90.7%
Final simplification86.5%
(FPCore (x s) :precision binary32 (if (<= x -8.999999840607448e-23) (/ 1.0 (- (- 2.0 (/ x s)) (/ (* (* x x) -0.5) (* s s)))) (/ 1.0 (+ 1.0 (/ 1.0 (+ 1.0 (/ x s)))))))
float code(float x, float s) {
float tmp;
if (x <= -8.999999840607448e-23f) {
tmp = 1.0f / ((2.0f - (x / s)) - (((x * x) * -0.5f) / (s * s)));
} else {
tmp = 1.0f / (1.0f + (1.0f / (1.0f + (x / s))));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-8.999999840607448e-23)) then
tmp = 1.0e0 / ((2.0e0 - (x / s)) - (((x * x) * (-0.5e0)) / (s * s)))
else
tmp = 1.0e0 / (1.0e0 + (1.0e0 / (1.0e0 + (x / s))))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-8.999999840607448e-23)) tmp = Float32(Float32(1.0) / Float32(Float32(Float32(2.0) - Float32(x / s)) - Float32(Float32(Float32(x * x) * Float32(-0.5)) / Float32(s * s)))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(x / s))))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-8.999999840607448e-23)) tmp = single(1.0) / ((single(2.0) - (x / s)) - (((x * x) * single(-0.5)) / (s * s))); else tmp = single(1.0) / (single(1.0) + (single(1.0) / (single(1.0) + (x / s)))); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.999999840607448 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{\left(2 - \frac{x}{s}\right) - \frac{\left(x \cdot x\right) \cdot -0.5}{s \cdot s}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{1}{1 + \frac{x}{s}}}\\
\end{array}
\end{array}
if x < -8.99999984e-23Initial program 99.6%
distribute-frac-neg99.6%
exp-neg99.6%
Applied egg-rr99.6%
Taylor expanded in s around inf 45.3%
+-commutative45.3%
mul-1-neg45.3%
sub-neg45.3%
mul-1-neg45.3%
unsub-neg45.3%
distribute-rgt-out80.5%
metadata-eval80.5%
unpow280.5%
times-frac75.0%
unpow275.0%
Simplified75.0%
frac-times80.5%
Applied egg-rr80.5%
if -8.99999984e-23 < x Initial program 99.9%
distribute-frac-neg99.9%
exp-neg99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 90.7%
Final simplification86.5%
(FPCore (x s) :precision binary32 (if (<= x -8.999999840607448e-23) (/ 1.0 (+ 2.0 (- (/ (* x x) (* s s)) (/ x s)))) (/ 1.0 (+ 1.0 (/ 1.0 (+ 1.0 (/ x s)))))))
float code(float x, float s) {
float tmp;
if (x <= -8.999999840607448e-23f) {
tmp = 1.0f / (2.0f + (((x * x) / (s * s)) - (x / s)));
} else {
tmp = 1.0f / (1.0f + (1.0f / (1.0f + (x / s))));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-8.999999840607448e-23)) then
tmp = 1.0e0 / (2.0e0 + (((x * x) / (s * s)) - (x / s)))
else
tmp = 1.0e0 / (1.0e0 + (1.0e0 / (1.0e0 + (x / s))))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-8.999999840607448e-23)) tmp = Float32(Float32(1.0) / Float32(Float32(2.0) + Float32(Float32(Float32(x * x) / Float32(s * s)) - Float32(x / s)))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(x / s))))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-8.999999840607448e-23)) tmp = single(1.0) / (single(2.0) + (((x * x) / (s * s)) - (x / s))); else tmp = single(1.0) / (single(1.0) + (single(1.0) / (single(1.0) + (x / s)))); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.999999840607448 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{2 + \left(\frac{x \cdot x}{s \cdot s} - \frac{x}{s}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{1}{1 + \frac{x}{s}}}\\
\end{array}
\end{array}
if x < -8.99999984e-23Initial program 99.6%
distribute-frac-neg99.6%
exp-neg99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 15.7%
Taylor expanded in x around 0 80.4%
unpow280.4%
unpow280.4%
neg-mul-180.4%
distribute-neg-frac80.4%
Simplified80.4%
if -8.99999984e-23 < x Initial program 99.9%
distribute-frac-neg99.9%
exp-neg99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 90.7%
Final simplification86.5%
(FPCore (x s) :precision binary32 (if (<= x -5.0000000843119176e-17) (/ (/ (* 2.0 (* s s)) x) x) (/ 1.0 (+ 1.0 (/ 1.0 (+ 1.0 (/ x s)))))))
float code(float x, float s) {
float tmp;
if (x <= -5.0000000843119176e-17f) {
tmp = ((2.0f * (s * s)) / x) / x;
} else {
tmp = 1.0f / (1.0f + (1.0f / (1.0f + (x / s))));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-5.0000000843119176e-17)) then
tmp = ((2.0e0 * (s * s)) / x) / x
else
tmp = 1.0e0 / (1.0e0 + (1.0e0 / (1.0e0 + (x / s))))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-5.0000000843119176e-17)) tmp = Float32(Float32(Float32(Float32(2.0) * Float32(s * s)) / x) / x); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(x / s))))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-5.0000000843119176e-17)) tmp = ((single(2.0) * (s * s)) / x) / x; else tmp = single(1.0) / (single(1.0) + (single(1.0) / (single(1.0) + (x / s)))); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.0000000843119176 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{2 \cdot \left(s \cdot s\right)}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{1}{1 + \frac{x}{s}}}\\
\end{array}
\end{array}
if x < -5.00000008e-17Initial program 99.8%
Taylor expanded in x around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
unpow280.5%
unpow280.5%
times-frac75.9%
Simplified75.9%
Taylor expanded in x around inf 78.3%
unpow278.3%
unpow278.3%
Simplified78.3%
Taylor expanded in s around 0 78.3%
associate-*r/78.3%
unpow278.3%
unpow278.3%
associate-/r*78.3%
Simplified78.3%
if -5.00000008e-17 < x Initial program 99.7%
distribute-frac-neg99.7%
exp-neg99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 89.1%
Final simplification85.2%
(FPCore (x s) :precision binary32 (if (<= x -3.99999992980668e-14) (* s (/ -1.0 x)) (if (<= x 1.600000050199032e-21) (+ 0.5 (* (/ x s) 0.25)) (- 1.0 (/ s x)))))
float code(float x, float s) {
float tmp;
if (x <= -3.99999992980668e-14f) {
tmp = s * (-1.0f / x);
} else if (x <= 1.600000050199032e-21f) {
tmp = 0.5f + ((x / s) * 0.25f);
} else {
tmp = 1.0f - (s / x);
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-3.99999992980668e-14)) then
tmp = s * ((-1.0e0) / x)
else if (x <= 1.600000050199032e-21) then
tmp = 0.5e0 + ((x / s) * 0.25e0)
else
tmp = 1.0e0 - (s / x)
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-3.99999992980668e-14)) tmp = Float32(s * Float32(Float32(-1.0) / x)); elseif (x <= Float32(1.600000050199032e-21)) tmp = Float32(Float32(0.5) + Float32(Float32(x / s) * Float32(0.25))); else tmp = Float32(Float32(1.0) - Float32(s / x)); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-3.99999992980668e-14)) tmp = s * (single(-1.0) / x); elseif (x <= single(1.600000050199032e-21)) tmp = single(0.5) + ((x / s) * single(0.25)); else tmp = single(1.0) - (s / x); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.99999992980668 \cdot 10^{-14}:\\
\;\;\;\;s \cdot \frac{-1}{x}\\
\mathbf{elif}\;x \leq 1.600000050199032 \cdot 10^{-21}:\\
\;\;\;\;0.5 + \frac{x}{s} \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{s}{x}\\
\end{array}
\end{array}
if x < -3.99999993e-14Initial program 99.8%
Taylor expanded in x around 0 42.4%
mul-1-neg42.4%
unsub-neg42.4%
Simplified42.4%
Taylor expanded in x around inf 40.3%
associate-*r/40.3%
neg-mul-140.3%
Simplified40.3%
div-inv40.3%
Applied egg-rr40.3%
if -3.99999993e-14 < x < 1.60000005e-21Initial program 99.4%
Taylor expanded in x around 0 71.2%
*-commutative71.2%
Simplified71.2%
if 1.60000005e-21 < x Initial program 100.0%
distribute-frac-neg100.0%
exp-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around inf 88.4%
neg-mul-188.4%
distribute-frac-neg88.4%
+-commutative88.4%
distribute-frac-neg88.4%
unsub-neg88.4%
Simplified88.4%
Final simplification67.3%
(FPCore (x s)
:precision binary32
(if (<= x -3.99999992980668e-14)
(* s (/ -1.0 x))
(if (<= x 1.600000050199032e-21)
(+ 0.5 (* (/ x s) 0.25))
(/ 1.0 (+ 1.0 (/ s x))))))
float code(float x, float s) {
float tmp;
if (x <= -3.99999992980668e-14f) {
tmp = s * (-1.0f / x);
} else if (x <= 1.600000050199032e-21f) {
tmp = 0.5f + ((x / s) * 0.25f);
} else {
tmp = 1.0f / (1.0f + (s / x));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-3.99999992980668e-14)) then
tmp = s * ((-1.0e0) / x)
else if (x <= 1.600000050199032e-21) then
tmp = 0.5e0 + ((x / s) * 0.25e0)
else
tmp = 1.0e0 / (1.0e0 + (s / x))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-3.99999992980668e-14)) tmp = Float32(s * Float32(Float32(-1.0) / x)); elseif (x <= Float32(1.600000050199032e-21)) tmp = Float32(Float32(0.5) + Float32(Float32(x / s) * Float32(0.25))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(s / x))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-3.99999992980668e-14)) tmp = s * (single(-1.0) / x); elseif (x <= single(1.600000050199032e-21)) tmp = single(0.5) + ((x / s) * single(0.25)); else tmp = single(1.0) / (single(1.0) + (s / x)); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.99999992980668 \cdot 10^{-14}:\\
\;\;\;\;s \cdot \frac{-1}{x}\\
\mathbf{elif}\;x \leq 1.600000050199032 \cdot 10^{-21}:\\
\;\;\;\;0.5 + \frac{x}{s} \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{s}{x}}\\
\end{array}
\end{array}
if x < -3.99999993e-14Initial program 99.8%
Taylor expanded in x around 0 42.4%
mul-1-neg42.4%
unsub-neg42.4%
Simplified42.4%
Taylor expanded in x around inf 40.3%
associate-*r/40.3%
neg-mul-140.3%
Simplified40.3%
div-inv40.3%
Applied egg-rr40.3%
if -3.99999993e-14 < x < 1.60000005e-21Initial program 99.4%
Taylor expanded in x around 0 71.2%
*-commutative71.2%
Simplified71.2%
if 1.60000005e-21 < x Initial program 100.0%
distribute-frac-neg100.0%
exp-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around inf 89.5%
Final simplification67.7%
(FPCore (x s)
:precision binary32
(if (<= x -3.99999992980668e-14)
(* 2.0 (* (/ s x) (/ s x)))
(if (<= x 1.600000050199032e-21)
(+ 0.5 (* (/ x s) 0.25))
(/ 1.0 (+ 1.0 (/ s x))))))
float code(float x, float s) {
float tmp;
if (x <= -3.99999992980668e-14f) {
tmp = 2.0f * ((s / x) * (s / x));
} else if (x <= 1.600000050199032e-21f) {
tmp = 0.5f + ((x / s) * 0.25f);
} else {
tmp = 1.0f / (1.0f + (s / x));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-3.99999992980668e-14)) then
tmp = 2.0e0 * ((s / x) * (s / x))
else if (x <= 1.600000050199032e-21) then
tmp = 0.5e0 + ((x / s) * 0.25e0)
else
tmp = 1.0e0 / (1.0e0 + (s / x))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-3.99999992980668e-14)) tmp = Float32(Float32(2.0) * Float32(Float32(s / x) * Float32(s / x))); elseif (x <= Float32(1.600000050199032e-21)) tmp = Float32(Float32(0.5) + Float32(Float32(x / s) * Float32(0.25))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(s / x))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-3.99999992980668e-14)) tmp = single(2.0) * ((s / x) * (s / x)); elseif (x <= single(1.600000050199032e-21)) tmp = single(0.5) + ((x / s) * single(0.25)); else tmp = single(1.0) / (single(1.0) + (s / x)); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.99999992980668 \cdot 10^{-14}:\\
\;\;\;\;2 \cdot \left(\frac{s}{x} \cdot \frac{s}{x}\right)\\
\mathbf{elif}\;x \leq 1.600000050199032 \cdot 10^{-21}:\\
\;\;\;\;0.5 + \frac{x}{s} \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{s}{x}}\\
\end{array}
\end{array}
if x < -3.99999993e-14Initial program 99.8%
Taylor expanded in x around 0 79.7%
mul-1-neg79.7%
unsub-neg79.7%
unpow279.7%
unpow279.7%
times-frac77.8%
Simplified77.8%
Taylor expanded in x around inf 78.7%
unpow278.7%
unpow278.7%
times-frac76.5%
Simplified76.5%
if -3.99999993e-14 < x < 1.60000005e-21Initial program 99.4%
Taylor expanded in x around 0 71.2%
*-commutative71.2%
Simplified71.2%
if 1.60000005e-21 < x Initial program 100.0%
distribute-frac-neg100.0%
exp-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around inf 89.5%
Final simplification79.8%
(FPCore (x s)
:precision binary32
(if (<= x -5.0000000843119176e-17)
(* 2.0 (/ (* s s) (* x x)))
(if (<= x 1.600000050199032e-21)
(+ 0.5 (* (/ x s) 0.25))
(/ 1.0 (+ 1.0 (/ s x))))))
float code(float x, float s) {
float tmp;
if (x <= -5.0000000843119176e-17f) {
tmp = 2.0f * ((s * s) / (x * x));
} else if (x <= 1.600000050199032e-21f) {
tmp = 0.5f + ((x / s) * 0.25f);
} else {
tmp = 1.0f / (1.0f + (s / x));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-5.0000000843119176e-17)) then
tmp = 2.0e0 * ((s * s) / (x * x))
else if (x <= 1.600000050199032e-21) then
tmp = 0.5e0 + ((x / s) * 0.25e0)
else
tmp = 1.0e0 / (1.0e0 + (s / x))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-5.0000000843119176e-17)) tmp = Float32(Float32(2.0) * Float32(Float32(s * s) / Float32(x * x))); elseif (x <= Float32(1.600000050199032e-21)) tmp = Float32(Float32(0.5) + Float32(Float32(x / s) * Float32(0.25))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(s / x))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-5.0000000843119176e-17)) tmp = single(2.0) * ((s * s) / (x * x)); elseif (x <= single(1.600000050199032e-21)) tmp = single(0.5) + ((x / s) * single(0.25)); else tmp = single(1.0) / (single(1.0) + (s / x)); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.0000000843119176 \cdot 10^{-17}:\\
\;\;\;\;2 \cdot \frac{s \cdot s}{x \cdot x}\\
\mathbf{elif}\;x \leq 1.600000050199032 \cdot 10^{-21}:\\
\;\;\;\;0.5 + \frac{x}{s} \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{s}{x}}\\
\end{array}
\end{array}
if x < -5.00000008e-17Initial program 99.8%
Taylor expanded in x around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
unpow280.5%
unpow280.5%
times-frac75.9%
Simplified75.9%
Taylor expanded in x around inf 78.3%
unpow278.3%
unpow278.3%
Simplified78.3%
if -5.00000008e-17 < x < 1.60000005e-21Initial program 99.4%
Taylor expanded in x around 0 74.8%
*-commutative74.8%
Simplified74.8%
if 1.60000005e-21 < x Initial program 100.0%
distribute-frac-neg100.0%
exp-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around inf 89.5%
Final simplification81.6%
(FPCore (x s)
:precision binary32
(if (<= x -5.0000000843119176e-17)
(/ (/ (* 2.0 (* s s)) x) x)
(if (<= x 1.600000050199032e-21)
(+ 0.5 (* (/ x s) 0.25))
(/ 1.0 (+ 1.0 (/ s x))))))
float code(float x, float s) {
float tmp;
if (x <= -5.0000000843119176e-17f) {
tmp = ((2.0f * (s * s)) / x) / x;
} else if (x <= 1.600000050199032e-21f) {
tmp = 0.5f + ((x / s) * 0.25f);
} else {
tmp = 1.0f / (1.0f + (s / x));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-5.0000000843119176e-17)) then
tmp = ((2.0e0 * (s * s)) / x) / x
else if (x <= 1.600000050199032e-21) then
tmp = 0.5e0 + ((x / s) * 0.25e0)
else
tmp = 1.0e0 / (1.0e0 + (s / x))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-5.0000000843119176e-17)) tmp = Float32(Float32(Float32(Float32(2.0) * Float32(s * s)) / x) / x); elseif (x <= Float32(1.600000050199032e-21)) tmp = Float32(Float32(0.5) + Float32(Float32(x / s) * Float32(0.25))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(s / x))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-5.0000000843119176e-17)) tmp = ((single(2.0) * (s * s)) / x) / x; elseif (x <= single(1.600000050199032e-21)) tmp = single(0.5) + ((x / s) * single(0.25)); else tmp = single(1.0) / (single(1.0) + (s / x)); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.0000000843119176 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{2 \cdot \left(s \cdot s\right)}{x}}{x}\\
\mathbf{elif}\;x \leq 1.600000050199032 \cdot 10^{-21}:\\
\;\;\;\;0.5 + \frac{x}{s} \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{s}{x}}\\
\end{array}
\end{array}
if x < -5.00000008e-17Initial program 99.8%
Taylor expanded in x around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
unpow280.5%
unpow280.5%
times-frac75.9%
Simplified75.9%
Taylor expanded in x around inf 78.3%
unpow278.3%
unpow278.3%
Simplified78.3%
Taylor expanded in s around 0 78.3%
associate-*r/78.3%
unpow278.3%
unpow278.3%
associate-/r*78.3%
Simplified78.3%
if -5.00000008e-17 < x < 1.60000005e-21Initial program 99.4%
Taylor expanded in x around 0 74.8%
*-commutative74.8%
Simplified74.8%
if 1.60000005e-21 < x Initial program 100.0%
distribute-frac-neg100.0%
exp-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around inf 89.5%
Final simplification81.6%
(FPCore (x s) :precision binary32 (if (<= x -3.99999992980668e-14) (/ (- s) x) (if (<= x 1.600000050199032e-21) 0.5 (- 1.0 (/ s x)))))
float code(float x, float s) {
float tmp;
if (x <= -3.99999992980668e-14f) {
tmp = -s / x;
} else if (x <= 1.600000050199032e-21f) {
tmp = 0.5f;
} else {
tmp = 1.0f - (s / x);
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-3.99999992980668e-14)) then
tmp = -s / x
else if (x <= 1.600000050199032e-21) then
tmp = 0.5e0
else
tmp = 1.0e0 - (s / x)
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-3.99999992980668e-14)) tmp = Float32(Float32(-s) / x); elseif (x <= Float32(1.600000050199032e-21)) tmp = Float32(0.5); else tmp = Float32(Float32(1.0) - Float32(s / x)); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-3.99999992980668e-14)) tmp = -s / x; elseif (x <= single(1.600000050199032e-21)) tmp = single(0.5); else tmp = single(1.0) - (s / x); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.99999992980668 \cdot 10^{-14}:\\
\;\;\;\;\frac{-s}{x}\\
\mathbf{elif}\;x \leq 1.600000050199032 \cdot 10^{-21}:\\
\;\;\;\;0.5\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{s}{x}\\
\end{array}
\end{array}
if x < -3.99999993e-14Initial program 99.8%
Taylor expanded in x around 0 42.4%
mul-1-neg42.4%
unsub-neg42.4%
Simplified42.4%
Taylor expanded in x around inf 40.3%
associate-*r/40.3%
neg-mul-140.3%
Simplified40.3%
if -3.99999993e-14 < x < 1.60000005e-21Initial program 99.4%
Taylor expanded in x around 0 67.6%
if 1.60000005e-21 < x Initial program 100.0%
distribute-frac-neg100.0%
exp-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around inf 88.4%
neg-mul-188.4%
distribute-frac-neg88.4%
+-commutative88.4%
distribute-frac-neg88.4%
unsub-neg88.4%
Simplified88.4%
Final simplification66.2%
(FPCore (x s) :precision binary32 (if (<= x -3.99999992980668e-14) (* s (/ -1.0 x)) (if (<= x 1.600000050199032e-21) 0.5 (- 1.0 (/ s x)))))
float code(float x, float s) {
float tmp;
if (x <= -3.99999992980668e-14f) {
tmp = s * (-1.0f / x);
} else if (x <= 1.600000050199032e-21f) {
tmp = 0.5f;
} else {
tmp = 1.0f - (s / x);
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-3.99999992980668e-14)) then
tmp = s * ((-1.0e0) / x)
else if (x <= 1.600000050199032e-21) then
tmp = 0.5e0
else
tmp = 1.0e0 - (s / x)
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-3.99999992980668e-14)) tmp = Float32(s * Float32(Float32(-1.0) / x)); elseif (x <= Float32(1.600000050199032e-21)) tmp = Float32(0.5); else tmp = Float32(Float32(1.0) - Float32(s / x)); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-3.99999992980668e-14)) tmp = s * (single(-1.0) / x); elseif (x <= single(1.600000050199032e-21)) tmp = single(0.5); else tmp = single(1.0) - (s / x); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.99999992980668 \cdot 10^{-14}:\\
\;\;\;\;s \cdot \frac{-1}{x}\\
\mathbf{elif}\;x \leq 1.600000050199032 \cdot 10^{-21}:\\
\;\;\;\;0.5\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{s}{x}\\
\end{array}
\end{array}
if x < -3.99999993e-14Initial program 99.8%
Taylor expanded in x around 0 42.4%
mul-1-neg42.4%
unsub-neg42.4%
Simplified42.4%
Taylor expanded in x around inf 40.3%
associate-*r/40.3%
neg-mul-140.3%
Simplified40.3%
div-inv40.3%
Applied egg-rr40.3%
if -3.99999993e-14 < x < 1.60000005e-21Initial program 99.4%
Taylor expanded in x around 0 67.6%
if 1.60000005e-21 < x Initial program 100.0%
distribute-frac-neg100.0%
exp-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around inf 88.4%
neg-mul-188.4%
distribute-frac-neg88.4%
+-commutative88.4%
distribute-frac-neg88.4%
unsub-neg88.4%
Simplified88.4%
Final simplification66.2%
(FPCore (x s) :precision binary32 (if (<= x 5.000000136226006e-28) (/ 1.0 (- 2.0 (/ x s))) (/ 1.0 (+ 1.0 (/ s x)))))
float code(float x, float s) {
float tmp;
if (x <= 5.000000136226006e-28f) {
tmp = 1.0f / (2.0f - (x / s));
} else {
tmp = 1.0f / (1.0f + (s / x));
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= 5.000000136226006e-28) then
tmp = 1.0e0 / (2.0e0 - (x / s))
else
tmp = 1.0e0 / (1.0e0 + (s / x))
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(5.000000136226006e-28)) tmp = Float32(Float32(1.0) / Float32(Float32(2.0) - Float32(x / s))); else tmp = Float32(Float32(1.0) / Float32(Float32(1.0) + Float32(s / x))); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(5.000000136226006e-28)) tmp = single(1.0) / (single(2.0) - (x / s)); else tmp = single(1.0) / (single(1.0) + (s / x)); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.000000136226006 \cdot 10^{-28}:\\
\;\;\;\;\frac{1}{2 - \frac{x}{s}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{s}{x}}\\
\end{array}
\end{array}
if x < 5.00000014e-28Initial program 99.6%
Taylor expanded in x around 0 54.8%
mul-1-neg54.8%
unsub-neg54.8%
Simplified54.8%
if 5.00000014e-28 < x Initial program 100.0%
distribute-frac-neg100.0%
exp-neg100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around inf 85.6%
Final simplification67.8%
(FPCore (x s) :precision binary32 (if (<= x -3.99999992980668e-14) (/ (- s) x) 0.5))
float code(float x, float s) {
float tmp;
if (x <= -3.99999992980668e-14f) {
tmp = -s / x;
} else {
tmp = 0.5f;
}
return tmp;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
real(4) :: tmp
if (x <= (-3.99999992980668e-14)) then
tmp = -s / x
else
tmp = 0.5e0
end if
code = tmp
end function
function code(x, s) tmp = Float32(0.0) if (x <= Float32(-3.99999992980668e-14)) tmp = Float32(Float32(-s) / x); else tmp = Float32(0.5); end return tmp end
function tmp_2 = code(x, s) tmp = single(0.0); if (x <= single(-3.99999992980668e-14)) tmp = -s / x; else tmp = single(0.5); end tmp_2 = tmp; end
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.99999992980668 \cdot 10^{-14}:\\
\;\;\;\;\frac{-s}{x}\\
\mathbf{else}:\\
\;\;\;\;0.5\\
\end{array}
\end{array}
if x < -3.99999993e-14Initial program 99.8%
Taylor expanded in x around 0 42.4%
mul-1-neg42.4%
unsub-neg42.4%
Simplified42.4%
Taylor expanded in x around inf 40.3%
associate-*r/40.3%
neg-mul-140.3%
Simplified40.3%
if -3.99999993e-14 < x Initial program 99.7%
Taylor expanded in x around 0 47.2%
Final simplification44.9%
(FPCore (x s) :precision binary32 0.5)
float code(float x, float s) {
return 0.5f;
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
code = 0.5e0
end function
function code(x, s) return Float32(0.5) end
function tmp = code(x, s) tmp = single(0.5); end
\begin{array}{l}
\\
0.5
\end{array}
Initial program 99.8%
Taylor expanded in x around 0 33.6%
Final simplification33.6%
herbie shell --seed 2023182
(FPCore (x s)
:name "Logistic function"
:precision binary32
:pre (and (<= 0.0 s) (<= s 1.0651631))
(/ 1.0 (+ 1.0 (exp (/ (- x) s)))))