
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z))
double code(double x, double y, double z) {
return (cosh(x) * (y / x)) / z;
}
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, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (cosh(x) * (y / x)) / z
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) * (y / x)) / z;
}
def code(x, y, z): return (math.cosh(x) * (y / x)) / z
function code(x, y, z) return Float64(Float64(cosh(x) * Float64(y / x)) / z) end
function tmp = code(x, y, z) tmp = (cosh(x) * (y / x)) / z; end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \frac{y}{x}}{z}
\end{array}
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z))
double code(double x, double y, double z) {
return (cosh(x) * (y / x)) / z;
}
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, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (cosh(x) * (y / x)) / z
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) * (y / x)) / z;
}
def code(x, y, z): return (math.cosh(x) * (y / x)) / z
function code(x, y, z) return Float64(Float64(cosh(x) * Float64(y / x)) / z) end
function tmp = code(x, y, z) tmp = (cosh(x) * (y / x)) / z; end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \frac{y}{x}}{z}
\end{array}
(FPCore (x y z) :precision binary64 (let* ((t_0 (/ (* (cosh x) (/ y x)) z))) (if (<= t_0 INFINITY) t_0 (/ (* (/ (* (* x x) 0.5) z) y) x))))
double code(double x, double y, double z) {
double t_0 = (cosh(x) * (y / x)) / z;
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = t_0;
} else {
tmp = ((((x * x) * 0.5) / z) * y) / x;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (Math.cosh(x) * (y / x)) / z;
double tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = t_0;
} else {
tmp = ((((x * x) * 0.5) / z) * y) / x;
}
return tmp;
}
def code(x, y, z): t_0 = (math.cosh(x) * (y / x)) / z tmp = 0 if t_0 <= math.inf: tmp = t_0 else: tmp = ((((x * x) * 0.5) / z) * y) / x return tmp
function code(x, y, z) t_0 = Float64(Float64(cosh(x) * Float64(y / x)) / z) tmp = 0.0 if (t_0 <= Inf) tmp = t_0; else tmp = Float64(Float64(Float64(Float64(Float64(x * x) * 0.5) / z) * y) / x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (cosh(x) * (y / x)) / z; tmp = 0.0; if (t_0 <= Inf) tmp = t_0; else tmp = ((((x * x) * 0.5) / z) * y) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], t$95$0, N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\cosh x \cdot \frac{y}{x}}{z}\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(x \cdot x\right) \cdot 0.5}{z} \cdot y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < +inf.0Initial program 95.1%
if +inf.0 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 0.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6480.2
Applied rewrites80.2%
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f6486.6
Applied rewrites86.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f6486.6
Applied rewrites86.6%
(FPCore (x y z) :precision binary64 (if (<= x 8.4e+129) (/ (* (cosh x) y) (* z x)) (/ (* (/ (fma (* x x) 0.5 1.0) z) y) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 8.4e+129) {
tmp = (cosh(x) * y) / (z * x);
} else {
tmp = ((fma((x * x), 0.5, 1.0) / z) * y) / x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 8.4e+129) tmp = Float64(Float64(cosh(x) * y) / Float64(z * x)); else tmp = Float64(Float64(Float64(fma(Float64(x * x), 0.5, 1.0) / z) * y) / x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 8.4e+129], N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / N[(z * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5 + 1.0), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.4 \cdot 10^{+129}:\\
\;\;\;\;\frac{\cosh x \cdot y}{z \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x \cdot x, 0.5, 1\right)}{z} \cdot y}{x}\\
\end{array}
\end{array}
if x < 8.39999999999999986e129Initial program 87.9%
lift-/.f64N/A
lift-*.f64N/A
lift-cosh.f64N/A
lift-/.f64N/A
associate-*r/N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f64N/A
lift-cosh.f64N/A
*-commutativeN/A
lower-*.f6487.5
Applied rewrites87.5%
if 8.39999999999999986e129 < x Initial program 66.8%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6494.1
Applied rewrites94.1%
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f6494.5
Applied rewrites94.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (* (cosh x) (/ y x)) z)))
(if (<= t_0 2e+58)
(/ (* (fma (* x x) 0.5 1.0) (/ y x)) z)
(if (<= t_0 INFINITY)
(/ (/ (fma (* (* x x) y) 0.5 y) z) x)
(/ (* (/ (* (* x x) 0.5) z) y) x)))))
double code(double x, double y, double z) {
double t_0 = (cosh(x) * (y / x)) / z;
double tmp;
if (t_0 <= 2e+58) {
tmp = (fma((x * x), 0.5, 1.0) * (y / x)) / z;
} else if (t_0 <= ((double) INFINITY)) {
tmp = (fma(((x * x) * y), 0.5, y) / z) / x;
} else {
tmp = ((((x * x) * 0.5) / z) * y) / x;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(cosh(x) * Float64(y / x)) / z) tmp = 0.0 if (t_0 <= 2e+58) tmp = Float64(Float64(fma(Float64(x * x), 0.5, 1.0) * Float64(y / x)) / z); elseif (t_0 <= Inf) tmp = Float64(Float64(fma(Float64(Float64(x * x) * y), 0.5, y) / z) / x); else tmp = Float64(Float64(Float64(Float64(Float64(x * x) * 0.5) / z) * y) / x); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+58], N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5 + 1.0), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * y), $MachinePrecision] * 0.5 + y), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\cosh x \cdot \frac{y}{x}}{z}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+58}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot x, 0.5, 1\right) \cdot \frac{y}{x}}{z}\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\left(x \cdot x\right) \cdot y, 0.5, y\right)}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(x \cdot x\right) \cdot 0.5}{z} \cdot y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.99999999999999989e58Initial program 96.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6480.8
Applied rewrites80.8%
if 1.99999999999999989e58 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < +inf.0Initial program 93.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.8
Applied rewrites81.8%
if +inf.0 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 0.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6480.2
Applied rewrites80.2%
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f6486.6
Applied rewrites86.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f6486.6
Applied rewrites86.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (* (cosh x) (/ y x)) z)))
(if (<= t_0 2e+58)
(/ (/ y x) z)
(if (<= t_0 INFINITY)
(/ (/ (fma (* (* x x) y) 0.5 y) z) x)
(/ (* (/ (* (* x x) 0.5) z) y) x)))))
double code(double x, double y, double z) {
double t_0 = (cosh(x) * (y / x)) / z;
double tmp;
if (t_0 <= 2e+58) {
tmp = (y / x) / z;
} else if (t_0 <= ((double) INFINITY)) {
tmp = (fma(((x * x) * y), 0.5, y) / z) / x;
} else {
tmp = ((((x * x) * 0.5) / z) * y) / x;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(cosh(x) * Float64(y / x)) / z) tmp = 0.0 if (t_0 <= 2e+58) tmp = Float64(Float64(y / x) / z); elseif (t_0 <= Inf) tmp = Float64(Float64(fma(Float64(Float64(x * x) * y), 0.5, y) / z) / x); else tmp = Float64(Float64(Float64(Float64(Float64(x * x) * 0.5) / z) * y) / x); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+58], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * y), $MachinePrecision] * 0.5 + y), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\cosh x \cdot \frac{y}{x}}{z}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+58}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\left(x \cdot x\right) \cdot y, 0.5, y\right)}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(x \cdot x\right) \cdot 0.5}{z} \cdot y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.99999999999999989e58Initial program 96.3%
Taylor expanded in x around 0
lift-/.f6462.5
Applied rewrites62.5%
if 1.99999999999999989e58 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < +inf.0Initial program 93.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.8
Applied rewrites81.8%
if +inf.0 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 0.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6480.2
Applied rewrites80.2%
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f6486.6
Applied rewrites86.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f6486.6
Applied rewrites86.6%
(FPCore (x y z) :precision binary64 (if (<= (/ (* (cosh x) (/ y x)) z) 2e+58) (/ (/ y x) z) (/ (* (/ (fma (* x x) 0.5 1.0) z) y) x)))
double code(double x, double y, double z) {
double tmp;
if (((cosh(x) * (y / x)) / z) <= 2e+58) {
tmp = (y / x) / z;
} else {
tmp = ((fma((x * x), 0.5, 1.0) / z) * y) / x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y / x)) / z) <= 2e+58) tmp = Float64(Float64(y / x) / z); else tmp = Float64(Float64(Float64(fma(Float64(x * x), 0.5, 1.0) / z) * y) / x); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 2e+58], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5 + 1.0), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y}{x}}{z} \leq 2 \cdot 10^{+58}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x \cdot x, 0.5, 1\right)}{z} \cdot y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.99999999999999989e58Initial program 96.3%
Taylor expanded in x around 0
lift-/.f6462.5
Applied rewrites62.5%
if 1.99999999999999989e58 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 71.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.4
Applied rewrites81.4%
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f6482.3
Applied rewrites82.3%
(FPCore (x y z) :precision binary64 (if (<= x 1.4) (/ (/ y z) x) (/ (* (/ (* (* x x) 0.5) z) y) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else {
tmp = ((((x * x) * 0.5) / z) * y) / x;
}
return tmp;
}
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, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.4d0) then
tmp = (y / z) / x
else
tmp = ((((x * x) * 0.5d0) / z) * y) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else {
tmp = ((((x * x) * 0.5) / z) * y) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.4: tmp = (y / z) / x else: tmp = ((((x * x) * 0.5) / z) * y) / x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(Float64(y / z) / x); else tmp = Float64(Float64(Float64(Float64(Float64(x * x) * 0.5) / z) * y) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.4) tmp = (y / z) / x; else tmp = ((((x * x) * 0.5) / z) * y) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.4], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(x \cdot x\right) \cdot 0.5}{z} \cdot y}{x}\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 87.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.7
Applied rewrites84.7%
Taylor expanded in x around 0
Applied rewrites67.1%
if 1.3999999999999999 < x Initial program 78.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6470.5
Applied rewrites70.5%
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f6470.2
Applied rewrites70.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f6470.2
Applied rewrites70.2%
(FPCore (x y z)
:precision binary64
(if (<= x 1.4)
(/ (/ y z) x)
(if (<= x 7.5e+113)
(/ (* (* (* 0.5 x) y) x) (* z x))
(if (<= x 8.2e+265)
(* (/ (* (* x x) 0.5) (* z x)) y)
(* (/ (fma 0.5 x (/ 1.0 x)) z) y)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else if (x <= 7.5e+113) {
tmp = (((0.5 * x) * y) * x) / (z * x);
} else if (x <= 8.2e+265) {
tmp = (((x * x) * 0.5) / (z * x)) * y;
} else {
tmp = (fma(0.5, x, (1.0 / x)) / z) * y;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(Float64(y / z) / x); elseif (x <= 7.5e+113) tmp = Float64(Float64(Float64(Float64(0.5 * x) * y) * x) / Float64(z * x)); elseif (x <= 8.2e+265) tmp = Float64(Float64(Float64(Float64(x * x) * 0.5) / Float64(z * x)) * y); else tmp = Float64(Float64(fma(0.5, x, Float64(1.0 / x)) / z) * y); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.4], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 7.5e+113], N[(N[(N[(N[(0.5 * x), $MachinePrecision] * y), $MachinePrecision] * x), $MachinePrecision] / N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e+265], N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] / N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(0.5 * x + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+113}:\\
\;\;\;\;\frac{\left(\left(0.5 \cdot x\right) \cdot y\right) \cdot x}{z \cdot x}\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+265}:\\
\;\;\;\;\frac{\left(x \cdot x\right) \cdot 0.5}{z \cdot x} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, x, \frac{1}{x}\right)}{z} \cdot y\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 87.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.7
Applied rewrites84.7%
Taylor expanded in x around 0
Applied rewrites67.1%
if 1.3999999999999999 < x < 7.5000000000000001e113Initial program 95.6%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6434.3
Applied rewrites34.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-*.f6434.3
Applied rewrites34.3%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites29.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
associate-*l*N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6429.1
Applied rewrites29.1%
if 7.5000000000000001e113 < x < 8.2000000000000007e265Initial program 72.7%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6489.3
Applied rewrites89.3%
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites59.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f6459.4
Applied rewrites59.4%
if 8.2000000000000007e265 < x Initial program 51.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites50.6%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-/r*N/A
+-commutativeN/A
pow2N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lower-/.f64N/A
lift-fma.f64N/A
lift-*.f64100.0
Applied rewrites100.0%
Taylor expanded in x around inf
distribute-rgt-inN/A
pow-flipN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f6458.1
Applied rewrites58.1%
(FPCore (x y z)
:precision binary64
(if (<= x 1.4)
(/ (/ y z) x)
(if (<= x 8.2e+265)
(/ (* (* (* x x) 0.5) y) (* z x))
(* (/ (fma 0.5 x (/ 1.0 x)) z) y))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else if (x <= 8.2e+265) {
tmp = (((x * x) * 0.5) * y) / (z * x);
} else {
tmp = (fma(0.5, x, (1.0 / x)) / z) * y;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(Float64(y / z) / x); elseif (x <= 8.2e+265) tmp = Float64(Float64(Float64(Float64(x * x) * 0.5) * y) / Float64(z * x)); else tmp = Float64(Float64(fma(0.5, x, Float64(1.0 / x)) / z) * y); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.4], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 8.2e+265], N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] * y), $MachinePrecision] / N[(z * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.5 * x + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+265}:\\
\;\;\;\;\frac{\left(\left(x \cdot x\right) \cdot 0.5\right) \cdot y}{z \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, x, \frac{1}{x}\right)}{z} \cdot y\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 87.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.7
Applied rewrites84.7%
Taylor expanded in x around 0
Applied rewrites67.1%
if 1.3999999999999999 < x < 8.2000000000000007e265Initial program 82.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.2
Applied rewrites66.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-*.f6466.2
Applied rewrites66.2%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites47.0%
if 8.2000000000000007e265 < x Initial program 51.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites50.6%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-/r*N/A
+-commutativeN/A
pow2N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lower-/.f64N/A
lift-fma.f64N/A
lift-*.f64100.0
Applied rewrites100.0%
Taylor expanded in x around inf
distribute-rgt-inN/A
pow-flipN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f6458.1
Applied rewrites58.1%
(FPCore (x y z)
:precision binary64
(if (<= x 1.4)
(/ (/ y z) x)
(if (<= x 8.2e+265)
(* (/ (* (* x x) 0.5) (* z x)) y)
(* (/ (fma 0.5 x (/ 1.0 x)) z) y))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else if (x <= 8.2e+265) {
tmp = (((x * x) * 0.5) / (z * x)) * y;
} else {
tmp = (fma(0.5, x, (1.0 / x)) / z) * y;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(Float64(y / z) / x); elseif (x <= 8.2e+265) tmp = Float64(Float64(Float64(Float64(x * x) * 0.5) / Float64(z * x)) * y); else tmp = Float64(Float64(fma(0.5, x, Float64(1.0 / x)) / z) * y); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.4], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 8.2e+265], N[(N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] / N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(0.5 * x + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+265}:\\
\;\;\;\;\frac{\left(x \cdot x\right) \cdot 0.5}{z \cdot x} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, x, \frac{1}{x}\right)}{z} \cdot y\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 87.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.7
Applied rewrites84.7%
Taylor expanded in x around 0
Applied rewrites67.1%
if 1.3999999999999999 < x < 8.2000000000000007e265Initial program 82.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.2
Applied rewrites66.2%
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites45.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f6445.2
Applied rewrites45.2%
if 8.2000000000000007e265 < x Initial program 51.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites50.6%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-/r*N/A
+-commutativeN/A
pow2N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lower-/.f64N/A
lift-fma.f64N/A
lift-*.f64100.0
Applied rewrites100.0%
Taylor expanded in x around inf
distribute-rgt-inN/A
pow-flipN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f6458.1
Applied rewrites58.1%
(FPCore (x y z) :precision binary64 (if (<= (/ (* (cosh x) (/ y x)) z) 5e+306) (/ (/ y x) z) (* (/ (fma 0.5 x (/ 1.0 x)) z) y)))
double code(double x, double y, double z) {
double tmp;
if (((cosh(x) * (y / x)) / z) <= 5e+306) {
tmp = (y / x) / z;
} else {
tmp = (fma(0.5, x, (1.0 / x)) / z) * y;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y / x)) / z) <= 5e+306) tmp = Float64(Float64(y / x) / z); else tmp = Float64(Float64(fma(0.5, x, Float64(1.0 / x)) / z) * y); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 5e+306], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(0.5 * x + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y}{x}}{z} \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, x, \frac{1}{x}\right)}{z} \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 4.99999999999999993e306Initial program 96.7%
Taylor expanded in x around 0
lift-/.f6466.3
Applied rewrites66.3%
if 4.99999999999999993e306 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 66.6%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6478.7
Applied rewrites78.7%
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
pow2N/A
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites59.5%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-/r*N/A
+-commutativeN/A
pow2N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
pow2N/A
+-commutativeN/A
lower-/.f64N/A
lift-fma.f64N/A
lift-*.f6475.4
Applied rewrites75.4%
Taylor expanded in x around inf
distribute-rgt-inN/A
pow-flipN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
inv-powN/A
lower-fma.f64N/A
lower-/.f6454.1
Applied rewrites54.1%
(FPCore (x y z) :precision binary64 (if (<= x 1.4) (/ (/ y z) x) (/ (* (* 0.5 x) y) z)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else {
tmp = ((0.5 * x) * y) / z;
}
return tmp;
}
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, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.4d0) then
tmp = (y / z) / x
else
tmp = ((0.5d0 * x) * y) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else {
tmp = ((0.5 * x) * y) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.4: tmp = (y / z) / x else: tmp = ((0.5 * x) * y) / z return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(Float64(y / z) / x); else tmp = Float64(Float64(Float64(0.5 * x) * y) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.4) tmp = (y / z) / x; else tmp = ((0.5 * x) * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.4], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(0.5 * x), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(0.5 \cdot x\right) \cdot y}{z}\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 87.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.7
Applied rewrites84.7%
Taylor expanded in x around 0
Applied rewrites67.1%
if 1.3999999999999999 < x Initial program 78.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6470.5
Applied rewrites70.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6432.3
Applied rewrites32.3%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6440.4
Applied rewrites40.4%
(FPCore (x y z) :precision binary64 (if (<= x 1.4) (/ (/ y z) x) (* (* (/ y z) x) 0.5)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else {
tmp = ((y / z) * x) * 0.5;
}
return tmp;
}
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, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.4d0) then
tmp = (y / z) / x
else
tmp = ((y / z) * x) * 0.5d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.4) {
tmp = (y / z) / x;
} else {
tmp = ((y / z) * x) * 0.5;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.4: tmp = (y / z) / x else: tmp = ((y / z) * x) * 0.5 return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.4) tmp = Float64(Float64(y / z) / x); else tmp = Float64(Float64(Float64(y / z) * x) * 0.5); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.4) tmp = (y / z) / x; else tmp = ((y / z) * x) * 0.5; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.4], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision] * 0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{z} \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 87.0%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.7
Applied rewrites84.7%
Taylor expanded in x around 0
Applied rewrites67.1%
if 1.3999999999999999 < x Initial program 78.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6470.5
Applied rewrites70.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6432.3
Applied rewrites32.3%
(FPCore (x y z) :precision binary64 (if (<= (/ (* (cosh x) (/ y x)) z) 2e+58) (/ (/ y x) z) (/ (/ y z) x)))
double code(double x, double y, double z) {
double tmp;
if (((cosh(x) * (y / x)) / z) <= 2e+58) {
tmp = (y / x) / z;
} else {
tmp = (y / z) / x;
}
return tmp;
}
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, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (((cosh(x) * (y / x)) / z) <= 2d+58) then
tmp = (y / x) / z
else
tmp = (y / z) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (((Math.cosh(x) * (y / x)) / z) <= 2e+58) {
tmp = (y / x) / z;
} else {
tmp = (y / z) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if ((math.cosh(x) * (y / x)) / z) <= 2e+58: tmp = (y / x) / z else: tmp = (y / z) / x return tmp
function code(x, y, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y / x)) / z) <= 2e+58) tmp = Float64(Float64(y / x) / z); else tmp = Float64(Float64(y / z) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (((cosh(x) * (y / x)) / z) <= 2e+58) tmp = (y / x) / z; else tmp = (y / z) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 2e+58], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y}{x}}{z} \leq 2 \cdot 10^{+58}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.99999999999999989e58Initial program 96.3%
Taylor expanded in x around 0
lift-/.f6462.5
Applied rewrites62.5%
if 1.99999999999999989e58 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 71.3%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.4
Applied rewrites81.4%
Taylor expanded in x around 0
Applied rewrites42.7%
(FPCore (x y z) :precision binary64 (if (<= (/ (* (cosh x) (/ y x)) z) 2e+37) (/ y (* z x)) (/ (/ y z) x)))
double code(double x, double y, double z) {
double tmp;
if (((cosh(x) * (y / x)) / z) <= 2e+37) {
tmp = y / (z * x);
} else {
tmp = (y / z) / x;
}
return tmp;
}
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, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (((cosh(x) * (y / x)) / z) <= 2d+37) then
tmp = y / (z * x)
else
tmp = (y / z) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (((Math.cosh(x) * (y / x)) / z) <= 2e+37) {
tmp = y / (z * x);
} else {
tmp = (y / z) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if ((math.cosh(x) * (y / x)) / z) <= 2e+37: tmp = y / (z * x) else: tmp = (y / z) / x return tmp
function code(x, y, z) tmp = 0.0 if (Float64(Float64(cosh(x) * Float64(y / x)) / z) <= 2e+37) tmp = Float64(y / Float64(z * x)); else tmp = Float64(Float64(y / z) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (((cosh(x) * (y / x)) / z) <= 2e+37) tmp = y / (z * x); else tmp = (y / z) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 2e+37], N[(y / N[(z * x), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\cosh x \cdot \frac{y}{x}}{z} \leq 2 \cdot 10^{+37}:\\
\;\;\;\;\frac{y}{z \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.99999999999999991e37Initial program 96.3%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6462.2
Applied rewrites62.2%
if 1.99999999999999991e37 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) Initial program 71.7%
Taylor expanded in x around 0
lower-/.f64N/A
associate-*r/N/A
div-add-revN/A
+-commutativeN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.7
Applied rewrites81.7%
Taylor expanded in x around 0
Applied rewrites43.6%
(FPCore (x y z) :precision binary64 (/ y (* z x)))
double code(double x, double y, double z) {
return y / (z * 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, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y / (z * x)
end function
public static double code(double x, double y, double z) {
return y / (z * x);
}
def code(x, y, z): return y / (z * x)
function code(x, y, z) return Float64(y / Float64(z * x)) end
function tmp = code(x, y, z) tmp = y / (z * x); end
code[x_, y_, z_] := N[(y / N[(z * x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{z \cdot x}
\end{array}
Initial program 84.8%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6449.8
Applied rewrites49.8%
herbie shell --seed 2025114
(FPCore (x y z)
:name "Linear.Quaternion:$ctan from linear-1.19.1.3"
:precision binary64
(/ (* (cosh x) (/ y x)) z))