
(FPCore (x) :precision binary64 (/ 2.0 (+ (exp x) (exp (- x)))))
double code(double x) {
return 2.0 / (exp(x) + exp(-x));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x)
use fmin_fmax_functions
real(8), intent (in) :: x
code = 2.0d0 / (exp(x) + exp(-x))
end function
public static double code(double x) {
return 2.0 / (Math.exp(x) + Math.exp(-x));
}
def code(x): return 2.0 / (math.exp(x) + math.exp(-x))
function code(x) return Float64(2.0 / Float64(exp(x) + exp(Float64(-x)))) end
function tmp = code(x) tmp = 2.0 / (exp(x) + exp(-x)); end
code[x_] := N[(2.0 / N[(N[Exp[x], $MachinePrecision] + N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{e^{x} + e^{-x}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x) :precision binary64 (/ 2.0 (+ (exp x) (exp (- x)))))
double code(double x) {
return 2.0 / (exp(x) + exp(-x));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x)
use fmin_fmax_functions
real(8), intent (in) :: x
code = 2.0d0 / (exp(x) + exp(-x))
end function
public static double code(double x) {
return 2.0 / (Math.exp(x) + Math.exp(-x));
}
def code(x): return 2.0 / (math.exp(x) + math.exp(-x))
function code(x) return Float64(2.0 / Float64(exp(x) + exp(Float64(-x)))) end
function tmp = code(x) tmp = 2.0 / (exp(x) + exp(-x)); end
code[x_] := N[(2.0 / N[(N[Exp[x], $MachinePrecision] + N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{e^{x} + e^{-x}}
\end{array}
x_m = (fabs.f64 x) (FPCore (x_m) :precision binary64 (let* ((t_0 (exp (- x_m)))) (/ 2.0 (+ (pow t_0 -1.0) t_0))))
x_m = fabs(x);
double code(double x_m) {
double t_0 = exp(-x_m);
return 2.0 / (pow(t_0, -1.0) + t_0);
}
x_m = private
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_m)
use fmin_fmax_functions
real(8), intent (in) :: x_m
real(8) :: t_0
t_0 = exp(-x_m)
code = 2.0d0 / ((t_0 ** (-1.0d0)) + t_0)
end function
x_m = Math.abs(x);
public static double code(double x_m) {
double t_0 = Math.exp(-x_m);
return 2.0 / (Math.pow(t_0, -1.0) + t_0);
}
x_m = math.fabs(x) def code(x_m): t_0 = math.exp(-x_m) return 2.0 / (math.pow(t_0, -1.0) + t_0)
x_m = abs(x) function code(x_m) t_0 = exp(Float64(-x_m)) return Float64(2.0 / Float64((t_0 ^ -1.0) + t_0)) end
x_m = abs(x); function tmp = code(x_m) t_0 = exp(-x_m); tmp = 2.0 / ((t_0 ^ -1.0) + t_0); end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[Exp[(-x$95$m)], $MachinePrecision]}, N[(2.0 / N[(N[Power[t$95$0, -1.0], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
\begin{array}{l}
t_0 := e^{-x\_m}\\
\frac{2}{{t\_0}^{-1} + t\_0}
\end{array}
\end{array}
Initial program 100.0%
remove-double-divN/A
lift-exp.f64N/A
exp-negN/A
lift-neg.f64N/A
lift-exp.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Final simplification100.0%
x_m = (fabs.f64 x) (FPCore (x_m) :precision binary64 (pow (cosh x_m) -1.0))
x_m = fabs(x);
double code(double x_m) {
return pow(cosh(x_m), -1.0);
}
x_m = private
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_m)
use fmin_fmax_functions
real(8), intent (in) :: x_m
code = cosh(x_m) ** (-1.0d0)
end function
x_m = Math.abs(x);
public static double code(double x_m) {
return Math.pow(Math.cosh(x_m), -1.0);
}
x_m = math.fabs(x) def code(x_m): return math.pow(math.cosh(x_m), -1.0)
x_m = abs(x) function code(x_m) return cosh(x_m) ^ -1.0 end
x_m = abs(x); function tmp = code(x_m) tmp = cosh(x_m) ^ -1.0; end
x_m = N[Abs[x], $MachinePrecision] code[x$95$m_] := N[Power[N[Cosh[x$95$m], $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
{\cosh x\_m}^{-1}
\end{array}
Initial program 100.0%
lift-/.f64N/A
lift-+.f64N/A
lift-exp.f64N/A
lift-exp.f64N/A
lift-neg.f64N/A
cosh-undefN/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lower-cosh.f64100.0
Applied rewrites100.0%
Final simplification100.0%
x_m = (fabs.f64 x)
(FPCore (x_m)
:precision binary64
(pow
(fma
(*
(fma
(fma 0.001388888888888889 (* x_m x_m) 0.041666666666666664)
(* x_m x_m)
0.5)
x_m)
x_m
1.0)
-1.0))x_m = fabs(x);
double code(double x_m) {
return pow(fma((fma(fma(0.001388888888888889, (x_m * x_m), 0.041666666666666664), (x_m * x_m), 0.5) * x_m), x_m, 1.0), -1.0);
}
x_m = abs(x) function code(x_m) return fma(Float64(fma(fma(0.001388888888888889, Float64(x_m * x_m), 0.041666666666666664), Float64(x_m * x_m), 0.5) * x_m), x_m, 1.0) ^ -1.0 end
x_m = N[Abs[x], $MachinePrecision] code[x$95$m_] := N[Power[N[(N[(N[(N[(0.001388888888888889 * N[(x$95$m * x$95$m), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 0.5), $MachinePrecision] * x$95$m), $MachinePrecision] * x$95$m + 1.0), $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
{\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.001388888888888889, x\_m \cdot x\_m, 0.041666666666666664\right), x\_m \cdot x\_m, 0.5\right) \cdot x\_m, x\_m, 1\right)\right)}^{-1}
\end{array}
Initial program 100.0%
lift-/.f64N/A
lift-+.f64N/A
lift-exp.f64N/A
lift-exp.f64N/A
lift-neg.f64N/A
cosh-undefN/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lower-cosh.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6485.3
Applied rewrites85.3%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites89.1%
Final simplification89.1%
x_m = (fabs.f64 x) (FPCore (x_m) :precision binary64 (pow (fma (fma (* 0.001388888888888889 (* x_m x_m)) (* x_m x_m) 0.5) (* x_m x_m) 1.0) -1.0))
x_m = fabs(x);
double code(double x_m) {
return pow(fma(fma((0.001388888888888889 * (x_m * x_m)), (x_m * x_m), 0.5), (x_m * x_m), 1.0), -1.0);
}
x_m = abs(x) function code(x_m) return fma(fma(Float64(0.001388888888888889 * Float64(x_m * x_m)), Float64(x_m * x_m), 0.5), Float64(x_m * x_m), 1.0) ^ -1.0 end
x_m = N[Abs[x], $MachinePrecision] code[x$95$m_] := N[Power[N[(N[(N[(0.001388888888888889 * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 0.5), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
{\left(\mathsf{fma}\left(\mathsf{fma}\left(0.001388888888888889 \cdot \left(x\_m \cdot x\_m\right), x\_m \cdot x\_m, 0.5\right), x\_m \cdot x\_m, 1\right)\right)}^{-1}
\end{array}
Initial program 100.0%
lift-/.f64N/A
lift-+.f64N/A
lift-exp.f64N/A
lift-exp.f64N/A
lift-neg.f64N/A
cosh-undefN/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lower-cosh.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6489.1
Applied rewrites89.1%
Taylor expanded in x around inf
Applied rewrites89.0%
Final simplification89.0%
x_m = (fabs.f64 x) (FPCore (x_m) :precision binary64 (pow (fma (* (fma (* x_m x_m) 0.041666666666666664 0.5) x_m) x_m 1.0) -1.0))
x_m = fabs(x);
double code(double x_m) {
return pow(fma((fma((x_m * x_m), 0.041666666666666664, 0.5) * x_m), x_m, 1.0), -1.0);
}
x_m = abs(x) function code(x_m) return fma(Float64(fma(Float64(x_m * x_m), 0.041666666666666664, 0.5) * x_m), x_m, 1.0) ^ -1.0 end
x_m = N[Abs[x], $MachinePrecision] code[x$95$m_] := N[Power[N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision] * x$95$m), $MachinePrecision] * x$95$m + 1.0), $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
{\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.041666666666666664, 0.5\right) \cdot x\_m, x\_m, 1\right)\right)}^{-1}
\end{array}
Initial program 100.0%
lift-/.f64N/A
lift-+.f64N/A
lift-exp.f64N/A
lift-exp.f64N/A
lift-neg.f64N/A
cosh-undefN/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lower-cosh.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6485.3
Applied rewrites85.3%
Applied rewrites85.3%
Final simplification85.3%
x_m = (fabs.f64 x) (FPCore (x_m) :precision binary64 (pow (fma (* 0.041666666666666664 (* x_m x_m)) (* x_m x_m) 1.0) -1.0))
x_m = fabs(x);
double code(double x_m) {
return pow(fma((0.041666666666666664 * (x_m * x_m)), (x_m * x_m), 1.0), -1.0);
}
x_m = abs(x) function code(x_m) return fma(Float64(0.041666666666666664 * Float64(x_m * x_m)), Float64(x_m * x_m), 1.0) ^ -1.0 end
x_m = N[Abs[x], $MachinePrecision] code[x$95$m_] := N[Power[N[(N[(0.041666666666666664 * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision], -1.0], $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
{\left(\mathsf{fma}\left(0.041666666666666664 \cdot \left(x\_m \cdot x\_m\right), x\_m \cdot x\_m, 1\right)\right)}^{-1}
\end{array}
Initial program 100.0%
lift-/.f64N/A
lift-+.f64N/A
lift-exp.f64N/A
lift-exp.f64N/A
lift-neg.f64N/A
cosh-undefN/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lower-cosh.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6485.3
Applied rewrites85.3%
Taylor expanded in x around inf
Applied rewrites85.1%
Final simplification85.1%
x_m = (fabs.f64 x) (FPCore (x_m) :precision binary64 (/ 2.0 (fma x_m x_m 2.0)))
x_m = fabs(x);
double code(double x_m) {
return 2.0 / fma(x_m, x_m, 2.0);
}
x_m = abs(x) function code(x_m) return Float64(2.0 / fma(x_m, x_m, 2.0)) end
x_m = N[Abs[x], $MachinePrecision] code[x$95$m_] := N[(2.0 / N[(x$95$m * x$95$m + 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
\frac{2}{\mathsf{fma}\left(x\_m, x\_m, 2\right)}
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
lower-fma.f6473.7
Applied rewrites73.7%
x_m = (fabs.f64 x) (FPCore (x_m) :precision binary64 1.0)
x_m = fabs(x);
double code(double x_m) {
return 1.0;
}
x_m = private
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x_m)
use fmin_fmax_functions
real(8), intent (in) :: x_m
code = 1.0d0
end function
x_m = Math.abs(x);
public static double code(double x_m) {
return 1.0;
}
x_m = math.fabs(x) def code(x_m): return 1.0
x_m = abs(x) function code(x_m) return 1.0 end
x_m = abs(x); function tmp = code(x_m) tmp = 1.0; end
x_m = N[Abs[x], $MachinePrecision] code[x$95$m_] := 1.0
\begin{array}{l}
x_m = \left|x\right|
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites51.1%
herbie shell --seed 2024359
(FPCore (x)
:name "Hyperbolic secant"
:precision binary64
(/ 2.0 (+ (exp x) (exp (- x)))))