
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
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, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
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, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y)))
(t_2 (fma (fma (fma (+ a y) y b) y c) y i)))
(if (<= y -4e+78)
t_1
(if (<= y -3.6e+25)
(/
(+
27464.7644705
(fma 230661.510616 (/ 1.0 y) (fma y (+ z (* x y)) (/ t (* y y)))))
b)
(if (<= y 5.6e+28)
(fma
y
(/ (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) t_2)
(/ t t_2))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double t_2 = fma(fma(fma((a + y), y, b), y, c), y, i);
double tmp;
if (y <= -4e+78) {
tmp = t_1;
} else if (y <= -3.6e+25) {
tmp = (27464.7644705 + fma(230661.510616, (1.0 / y), fma(y, (z + (x * y)), (t / (y * y))))) / b;
} else if (y <= 5.6e+28) {
tmp = fma(y, (fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_2), (t / t_2));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) t_2 = fma(fma(fma(Float64(a + y), y, b), y, c), y, i) tmp = 0.0 if (y <= -4e+78) tmp = t_1; elseif (y <= -3.6e+25) tmp = Float64(Float64(27464.7644705 + fma(230661.510616, Float64(1.0 / y), fma(y, Float64(z + Float64(x * y)), Float64(t / Float64(y * y))))) / b); elseif (y <= 5.6e+28) tmp = fma(y, Float64(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_2), Float64(t / t_2)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[y, -4e+78], t$95$1, If[LessEqual[y, -3.6e+25], N[(N[(27464.7644705 + N[(230661.510616 * N[(1.0 / y), $MachinePrecision] + N[(y * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 5.6e+28], N[(y * N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
t_2 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;y \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{+25}:\\
\;\;\;\;\frac{27464.7644705 + \mathsf{fma}\left(230661.510616, \frac{1}{y}, \mathsf{fma}\left(y, z + x \cdot y, \frac{t}{y \cdot y}\right)\right)}{b}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_2}, \frac{t}{t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000003e78 or 5.6000000000000003e28 < y Initial program 1.5%
Taylor expanded in y around 0
lower-/.f643.1
Applied rewrites3.1%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6467.8
Applied rewrites67.8%
if -4.00000000000000003e78 < y < -3.60000000000000015e25Initial program 4.1%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites4.1%
Taylor expanded in b around inf
lower-/.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-fma.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6483.4
Applied rewrites83.4%
if -3.60000000000000015e25 < y < 5.6000000000000003e28Initial program 98.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites99.0%
Final simplification84.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (fma (fma (+ a y) y b) y c) y i)))
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(fma
y
(fma (fma (fma x y z) y 27464.7644705) (/ y t_1) (/ 230661.510616 t_1))
(/ t t_1))
(+ x (/ (- z (* a x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma(fma((a + y), y, b), y, c), y, i);
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, fma(fma(fma(x, y, z), y, 27464.7644705), (y / t_1), (230661.510616 / t_1)), (t / t_1));
} else {
tmp = x + ((z - (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(fma(Float64(a + y), y, b), y, c), y, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = fma(y, fma(fma(fma(x, y, z), y, 27464.7644705), Float64(y / t_1), Float64(230661.510616 / t_1)), Float64(t / t_1)); else tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * N[(y / t$95$1), $MachinePrecision] + N[(230661.510616 / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), \frac{y}{t\_1}, \frac{230661.510616}{t\_1}\right), \frac{t}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - a \cdot x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 88.0%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites88.6%
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
div-addN/A
lift-*.f64N/A
associate-/l*N/A
lower-fma.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f6490.9
Applied rewrites90.9%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around 0
lower-/.f643.0
Applied rewrites3.0%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6470.8
Applied rewrites70.8%
Final simplification82.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
(+ x (/ (- z (* a x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = x + ((z - (a * x)) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - a \cdot x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 88.0%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites83.9%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around 0
lower-/.f643.0
Applied rewrites3.0%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6470.8
Applied rewrites70.8%
Final simplification78.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y))))
(if (<= y -4e+78)
t_1
(if (<= y -1.88e+25)
(/
(+
27464.7644705
(fma 230661.510616 (/ 1.0 y) (fma y (+ z (* x y)) (/ t (* y y)))))
b)
(if (<= y 5.6e+28)
(/
(+
(fma (* (fma (fma y x z) y 27464.7644705) y) y (* 230661.510616 y))
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double tmp;
if (y <= -4e+78) {
tmp = t_1;
} else if (y <= -1.88e+25) {
tmp = (27464.7644705 + fma(230661.510616, (1.0 / y), fma(y, (z + (x * y)), (t / (y * y))))) / b;
} else if (y <= 5.6e+28) {
tmp = (fma((fma(fma(y, x, z), y, 27464.7644705) * y), y, (230661.510616 * y)) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) tmp = 0.0 if (y <= -4e+78) tmp = t_1; elseif (y <= -1.88e+25) tmp = Float64(Float64(27464.7644705 + fma(230661.510616, Float64(1.0 / y), fma(y, Float64(z + Float64(x * y)), Float64(t / Float64(y * y))))) / b); elseif (y <= 5.6e+28) tmp = Float64(Float64(fma(Float64(fma(fma(y, x, z), y, 27464.7644705) * y), y, Float64(230661.510616 * y)) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+78], t$95$1, If[LessEqual[y, -1.88e+25], N[(N[(27464.7644705 + N[(230661.510616 * N[(1.0 / y), $MachinePrecision] + N[(y * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 5.6e+28], N[(N[(N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] * y + N[(230661.510616 * y), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.88 \cdot 10^{+25}:\\
\;\;\;\;\frac{27464.7644705 + \mathsf{fma}\left(230661.510616, \frac{1}{y}, \mathsf{fma}\left(y, z + x \cdot y, \frac{t}{y \cdot y}\right)\right)}{b}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+28}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right) \cdot y, y, 230661.510616 \cdot y\right) + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000003e78 or 5.6000000000000003e28 < y Initial program 1.5%
Taylor expanded in y around 0
lower-/.f643.1
Applied rewrites3.1%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6467.8
Applied rewrites67.8%
if -4.00000000000000003e78 < y < -1.88e25Initial program 4.0%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites17.8%
Taylor expanded in b around inf
lower-/.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-fma.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6485.6
Applied rewrites85.6%
if -1.88e25 < y < 5.6000000000000003e28Initial program 99.0%
lift-*.f64N/A
*-commutativeN/A
lift-+.f64N/A
distribute-rgt-inN/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6499.0
Applied rewrites99.0%
Final simplification84.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(/ t i)
(/ z y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = t / i;
} else {
tmp = z / y;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Double.POSITIVE_INFINITY) {
tmp = t / i;
} else {
tmp = z / y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= math.inf: tmp = t / i else: tmp = z / y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = Float64(t / i); else tmp = Float64(z / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = t / i; else tmp = z / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(t / i), $MachinePrecision], N[(z / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 88.0%
Taylor expanded in y around 0
lower-/.f6449.7
Applied rewrites49.7%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites0.4%
Taylor expanded in y around inf
Applied rewrites17.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y))))
(if (<= y -4e+78)
t_1
(if (<= y -1.88e+25)
(/
(+
27464.7644705
(fma 230661.510616 (/ 1.0 y) (fma y (+ z (* x y)) (/ t (* y y)))))
b)
(if (<= y 1.2e+25)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double tmp;
if (y <= -4e+78) {
tmp = t_1;
} else if (y <= -1.88e+25) {
tmp = (27464.7644705 + fma(230661.510616, (1.0 / y), fma(y, (z + (x * y)), (t / (y * y))))) / b;
} else if (y <= 1.2e+25) {
tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) tmp = 0.0 if (y <= -4e+78) tmp = t_1; elseif (y <= -1.88e+25) tmp = Float64(Float64(27464.7644705 + fma(230661.510616, Float64(1.0 / y), fma(y, Float64(z + Float64(x * y)), Float64(t / Float64(y * y))))) / b); elseif (y <= 1.2e+25) tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+78], t$95$1, If[LessEqual[y, -1.88e+25], N[(N[(27464.7644705 + N[(230661.510616 * N[(1.0 / y), $MachinePrecision] + N[(y * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 1.2e+25], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.88 \cdot 10^{+25}:\\
\;\;\;\;\frac{27464.7644705 + \mathsf{fma}\left(230661.510616, \frac{1}{y}, \mathsf{fma}\left(y, z + x \cdot y, \frac{t}{y \cdot y}\right)\right)}{b}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000003e78 or 1.19999999999999998e25 < y Initial program 2.3%
Taylor expanded in y around 0
lower-/.f643.1
Applied rewrites3.1%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6467.3
Applied rewrites67.3%
if -4.00000000000000003e78 < y < -1.88e25Initial program 4.0%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites17.8%
Taylor expanded in b around inf
lower-/.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-fma.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6485.6
Applied rewrites85.6%
if -1.88e25 < y < 1.19999999999999998e25Initial program 99.0%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites95.1%
Final simplification82.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y))))
(if (<= y -4e+78)
t_1
(if (<= y -1.88e+25)
(* (* y y) (+ (/ x b) (/ z (* b y))))
(if (<= y -7.2e-51)
(/ (fma (* (* y y) z) y t) (fma (fma (fma (+ a y) y b) y c) y i))
(if (<= y 4.6e+23)
(/
(fma 230661.510616 y t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double tmp;
if (y <= -4e+78) {
tmp = t_1;
} else if (y <= -1.88e+25) {
tmp = (y * y) * ((x / b) + (z / (b * y)));
} else if (y <= -7.2e-51) {
tmp = fma(((y * y) * z), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else if (y <= 4.6e+23) {
tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) tmp = 0.0 if (y <= -4e+78) tmp = t_1; elseif (y <= -1.88e+25) tmp = Float64(Float64(y * y) * Float64(Float64(x / b) + Float64(z / Float64(b * y)))); elseif (y <= -7.2e-51) tmp = Float64(fma(Float64(Float64(y * y) * z), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); elseif (y <= 4.6e+23) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+78], t$95$1, If[LessEqual[y, -1.88e+25], N[(N[(y * y), $MachinePrecision] * N[(N[(x / b), $MachinePrecision] + N[(z / N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.2e-51], N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+23], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.88 \cdot 10^{+25}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{b \cdot y}\right)\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(y \cdot y\right) \cdot z, y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+23}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000003e78 or 4.6000000000000001e23 < y Initial program 2.3%
Taylor expanded in y around 0
lower-/.f643.1
Applied rewrites3.1%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6467.3
Applied rewrites67.3%
if -4.00000000000000003e78 < y < -1.88e25Initial program 4.0%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites58.4%
Taylor expanded in y around inf
Applied rewrites61.6%
if -1.88e25 < y < -7.2000000000000001e-51Initial program 99.3%
Taylor expanded in z around inf
lower-*.f64N/A
unpow2N/A
lower-*.f6483.9
Applied rewrites83.9%
Applied rewrites83.9%
if -7.2000000000000001e-51 < y < 4.6000000000000001e23Initial program 98.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6489.4
Applied rewrites89.4%
Final simplification78.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y))))
(if (<= y -4e+78)
t_1
(if (<= y -1.88e+25)
(fma
230661.510616
(/ 1.0 (* b y))
(/ (fma y z (+ 27464.7644705 (* x (* y y)))) b))
(if (<= y 1.2e+25)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double tmp;
if (y <= -4e+78) {
tmp = t_1;
} else if (y <= -1.88e+25) {
tmp = fma(230661.510616, (1.0 / (b * y)), (fma(y, z, (27464.7644705 + (x * (y * y)))) / b));
} else if (y <= 1.2e+25) {
tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) tmp = 0.0 if (y <= -4e+78) tmp = t_1; elseif (y <= -1.88e+25) tmp = fma(230661.510616, Float64(1.0 / Float64(b * y)), Float64(fma(y, z, Float64(27464.7644705 + Float64(x * Float64(y * y)))) / b)); elseif (y <= 1.2e+25) tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+78], t$95$1, If[LessEqual[y, -1.88e+25], N[(230661.510616 * N[(1.0 / N[(b * y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * z + N[(27464.7644705 + N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+25], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.88 \cdot 10^{+25}:\\
\;\;\;\;\mathsf{fma}\left(230661.510616, \frac{1}{b \cdot y}, \frac{\mathsf{fma}\left(y, z, 27464.7644705 + x \cdot \left(y \cdot y\right)\right)}{b}\right)\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000003e78 or 1.19999999999999998e25 < y Initial program 2.3%
Taylor expanded in y around 0
lower-/.f643.1
Applied rewrites3.1%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6467.3
Applied rewrites67.3%
if -4.00000000000000003e78 < y < -1.88e25Initial program 4.0%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites58.4%
Taylor expanded in t around 0
Applied rewrites58.8%
Taylor expanded in z around 0
Applied rewrites72.1%
if -1.88e25 < y < 1.19999999999999998e25Initial program 99.0%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites95.1%
Final simplification81.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y))))
(if (<= y -4e+78)
t_1
(if (<= y -6000000000.0)
(* (* y y) (+ (/ x b) (/ z (* b y))))
(if (<= y 4.6e+23)
(/
(fma 230661.510616 y t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double tmp;
if (y <= -4e+78) {
tmp = t_1;
} else if (y <= -6000000000.0) {
tmp = (y * y) * ((x / b) + (z / (b * y)));
} else if (y <= 4.6e+23) {
tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) tmp = 0.0 if (y <= -4e+78) tmp = t_1; elseif (y <= -6000000000.0) tmp = Float64(Float64(y * y) * Float64(Float64(x / b) + Float64(z / Float64(b * y)))); elseif (y <= 4.6e+23) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+78], t$95$1, If[LessEqual[y, -6000000000.0], N[(N[(y * y), $MachinePrecision] * N[(N[(x / b), $MachinePrecision] + N[(z / N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+23], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6000000000:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{b \cdot y}\right)\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+23}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000003e78 or 4.6000000000000001e23 < y Initial program 2.3%
Taylor expanded in y around 0
lower-/.f643.1
Applied rewrites3.1%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6467.3
Applied rewrites67.3%
if -4.00000000000000003e78 < y < -6e9Initial program 32.5%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites42.1%
Taylor expanded in y around inf
Applied rewrites44.4%
if -6e9 < y < 4.6000000000000001e23Initial program 99.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6485.2
Applied rewrites85.2%
Final simplification75.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y))))
(if (<= y -4e+78)
t_1
(if (<= y -6000000000.0)
(* (* y y) (+ (/ x b) (/ z (* b y))))
(if (<= y 4.6e+23) (/ t (fma (fma (fma (+ a y) y b) y c) y i)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double tmp;
if (y <= -4e+78) {
tmp = t_1;
} else if (y <= -6000000000.0) {
tmp = (y * y) * ((x / b) + (z / (b * y)));
} else if (y <= 4.6e+23) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) tmp = 0.0 if (y <= -4e+78) tmp = t_1; elseif (y <= -6000000000.0) tmp = Float64(Float64(y * y) * Float64(Float64(x / b) + Float64(z / Float64(b * y)))); elseif (y <= 4.6e+23) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+78], t$95$1, If[LessEqual[y, -6000000000.0], N[(N[(y * y), $MachinePrecision] * N[(N[(x / b), $MachinePrecision] + N[(z / N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+23], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6000000000:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(\frac{x}{b} + \frac{z}{b \cdot y}\right)\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000003e78 or 4.6000000000000001e23 < y Initial program 2.3%
Taylor expanded in y around 0
lower-/.f643.1
Applied rewrites3.1%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6467.3
Applied rewrites67.3%
if -4.00000000000000003e78 < y < -6e9Initial program 32.5%
Taylor expanded in b around inf
associate-/r*N/A
lower-/.f64N/A
Applied rewrites42.1%
Taylor expanded in y around inf
Applied rewrites44.4%
if -6e9 < y < 4.6000000000000001e23Initial program 99.0%
Taylor expanded in t around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6476.5
Applied rewrites76.5%
Final simplification71.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.15e+83) (not (<= y 4.6e+23))) (+ x (/ (- z (* a x)) y)) (/ t (fma (fma (fma (+ a y) y b) y c) y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.15e+83) || !(y <= 4.6e+23)) {
tmp = x + ((z - (a * x)) / y);
} else {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.15e+83) || !(y <= 4.6e+23)) tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y)); else tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.15e+83], N[Not[LessEqual[y, 4.6e+23]], $MachinePrecision]], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+83} \lor \neg \left(y \leq 4.6 \cdot 10^{+23}\right):\\
\;\;\;\;x + \frac{z - a \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\end{array}
\end{array}
if y < -1.14999999999999997e83 or 4.6000000000000001e23 < y Initial program 2.4%
Taylor expanded in y around 0
lower-/.f643.1
Applied rewrites3.1%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6467.8
Applied rewrites67.8%
if -1.14999999999999997e83 < y < 4.6000000000000001e23Initial program 93.5%
Taylor expanded in t around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6470.8
Applied rewrites70.8%
Final simplification69.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3.2e+29) (not (<= y 8.6e-18))) (+ x (/ (- z (* a x)) y)) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.2e+29) || !(y <= 8.6e-18)) {
tmp = x + ((z - (a * x)) / y);
} else {
tmp = t / i;
}
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, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-3.2d+29)) .or. (.not. (y <= 8.6d-18))) then
tmp = x + ((z - (a * x)) / y)
else
tmp = t / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.2e+29) || !(y <= 8.6e-18)) {
tmp = x + ((z - (a * x)) / y);
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.2e+29) or not (y <= 8.6e-18): tmp = x + ((z - (a * x)) / y) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.2e+29) || !(y <= 8.6e-18)) tmp = Float64(x + Float64(Float64(z - Float64(a * x)) / y)); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.2e+29) || ~((y <= 8.6e-18))) tmp = x + ((z - (a * x)) / y); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.2e+29], N[Not[LessEqual[y, 8.6e-18]], $MachinePrecision]], N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+29} \lor \neg \left(y \leq 8.6 \cdot 10^{-18}\right):\\
\;\;\;\;x + \frac{z - a \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -3.19999999999999987e29 or 8.6000000000000005e-18 < y Initial program 7.7%
Taylor expanded in y around 0
lower-/.f643.8
Applied rewrites3.8%
Taylor expanded in y around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-out--N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f6461.6
Applied rewrites61.6%
if -3.19999999999999987e29 < y < 8.6000000000000005e-18Initial program 98.2%
Taylor expanded in y around 0
lower-/.f6458.5
Applied rewrites58.5%
Final simplification60.1%
(FPCore (x y z t a b c i) :precision binary64 (/ z y))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z / y;
}
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, t, a, b, c, i)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = z / y
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z / y;
}
def code(x, y, z, t, a, b, c, i): return z / y
function code(x, y, z, t, a, b, c, i) return Float64(z / y) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = z / y; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{z}{y}
\end{array}
Initial program 52.6%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.3%
Taylor expanded in y around inf
Applied rewrites10.8%
herbie shell --seed 2025016
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
:precision binary64
(/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))