
(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);
}
real(8) function code(x, y, z, t, a, b, c, i)
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 18 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);
}
real(8) function code(x, y, z, t, a, b, c, i)
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 (fma (fma (fma (+ a y) y b) y c) y i)) (t_2 (+ (/ z y) x)))
(if (<= y -1.2e+38)
t_2
(if (<= y 1.55e+44)
(fma
y
(/ 1.0 (/ t_1 (fma (fma z y 27464.7644705) y 230661.510616)))
(fma x (/ (pow y 4.0) t_1) (/ t t_1)))
(if (<= y 1.85e+82)
(/
(+
(+
(/ 27464.7644705 y)
(+ (/ 230661.510616 (* y y)) (fma x y (/ t (pow y 3.0)))))
z)
a)
t_2)))))
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 t_2 = (z / y) + x;
double tmp;
if (y <= -1.2e+38) {
tmp = t_2;
} else if (y <= 1.55e+44) {
tmp = fma(y, (1.0 / (t_1 / fma(fma(z, y, 27464.7644705), y, 230661.510616))), fma(x, (pow(y, 4.0) / t_1), (t / t_1)));
} else if (y <= 1.85e+82) {
tmp = (((27464.7644705 / y) + ((230661.510616 / (y * y)) + fma(x, y, (t / pow(y, 3.0))))) + z) / a;
} else {
tmp = t_2;
}
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) t_2 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -1.2e+38) tmp = t_2; elseif (y <= 1.55e+44) tmp = fma(y, Float64(1.0 / Float64(t_1 / fma(fma(z, y, 27464.7644705), y, 230661.510616))), fma(x, Float64((y ^ 4.0) / t_1), Float64(t / t_1))); elseif (y <= 1.85e+82) tmp = Float64(Float64(Float64(Float64(27464.7644705 / y) + Float64(Float64(230661.510616 / Float64(y * y)) + fma(x, y, Float64(t / (y ^ 3.0))))) + z) / a); else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -1.2e+38], t$95$2, If[LessEqual[y, 1.55e+44], N[(y * N[(1.0 / N[(t$95$1 / N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[Power[y, 4.0], $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+82], N[(N[(N[(N[(27464.7644705 / y), $MachinePrecision] + N[(N[(230661.510616 / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(x * y + N[(t / N[Power[y, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]]
\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)\\
t_2 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{1}{\frac{t\_1}{\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right)}}, \mathsf{fma}\left(x, \frac{{y}^{4}}{t\_1}, \frac{t}{t\_1}\right)\right)\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+82}:\\
\;\;\;\;\frac{\left(\frac{27464.7644705}{y} + \left(\frac{230661.510616}{y \cdot y} + \mathsf{fma}\left(x, y, \frac{t}{{y}^{3}}\right)\right)\right) + z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.20000000000000009e38 or 1.8500000000000001e82 < y Initial program 0.5%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.4%
Taylor expanded in y around inf
Applied rewrites77.5%
if -1.20000000000000009e38 < y < 1.54999999999999998e44Initial program 96.3%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites96.3%
Applied rewrites96.3%
if 1.54999999999999998e44 < y < 1.8500000000000001e82Initial program 2.4%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites3.0%
Taylor expanded in a around inf
Applied rewrites88.8%
Final simplification88.4%
(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)
(+ (* (+ (* (+ (* (+ a y) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma z y 27464.7644705) y 230661.510616) t_1)
(fma x (* (/ (* y y) t_1) (* y y)) (/ t t_1)))
(+ (/ z y) x))))
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) / (((((((a + y) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = fma(y, (fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, (((y * y) / t_1) * (y * y)), (t / t_1)));
} else {
tmp = (z / y) + x;
}
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(a + y) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = fma(y, Float64(fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, Float64(Float64(Float64(y * y) / t_1) * Float64(y * y)), Float64(t / t_1))); else tmp = Float64(Float64(z / y) + x); 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[(a + y), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(y * N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x * N[(N[(N[(y * y), $MachinePrecision] / t$95$1), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / y), $MachinePrecision] + x), $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(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \mathsf{fma}\left(x, \frac{y \cdot y}{t\_1} \cdot \left(y \cdot y\right), \frac{t}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{y} + x\\
\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 89.3%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites90.4%
Applied rewrites90.5%
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 a 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
+-commutativeN/A
Applied rewrites0.0%
Taylor expanded in y around inf
Applied rewrites75.7%
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)) (t_2 (+ (/ z y) x)))
(if (<= y -1.2e+38)
t_2
(if (<= y 1.55e+44)
(fma
y
(/ (fma (fma z y 27464.7644705) y 230661.510616) t_1)
(fma x (* (/ (* y y) t_1) (* y y)) (/ t t_1)))
(if (<= y 1.85e+82)
(/
(+
(+
(/ 27464.7644705 y)
(+ (/ 230661.510616 (* y y)) (fma x y (/ t (pow y 3.0)))))
z)
a)
t_2)))))
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 t_2 = (z / y) + x;
double tmp;
if (y <= -1.2e+38) {
tmp = t_2;
} else if (y <= 1.55e+44) {
tmp = fma(y, (fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, (((y * y) / t_1) * (y * y)), (t / t_1)));
} else if (y <= 1.85e+82) {
tmp = (((27464.7644705 / y) + ((230661.510616 / (y * y)) + fma(x, y, (t / pow(y, 3.0))))) + z) / a;
} else {
tmp = t_2;
}
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) t_2 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -1.2e+38) tmp = t_2; elseif (y <= 1.55e+44) tmp = fma(y, Float64(fma(fma(z, y, 27464.7644705), y, 230661.510616) / t_1), fma(x, Float64(Float64(Float64(y * y) / t_1) * Float64(y * y)), Float64(t / t_1))); elseif (y <= 1.85e+82) tmp = Float64(Float64(Float64(Float64(27464.7644705 / y) + Float64(Float64(230661.510616 / Float64(y * y)) + fma(x, y, Float64(t / (y ^ 3.0))))) + z) / a); else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -1.2e+38], t$95$2, If[LessEqual[y, 1.55e+44], N[(y * N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x * N[(N[(N[(y * y), $MachinePrecision] / t$95$1), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+82], N[(N[(N[(N[(27464.7644705 / y), $MachinePrecision] + N[(N[(230661.510616 / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(x * y + N[(t / N[Power[y, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]]
\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)\\
t_2 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \mathsf{fma}\left(x, \frac{y \cdot y}{t\_1} \cdot \left(y \cdot y\right), \frac{t}{t\_1}\right)\right)\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+82}:\\
\;\;\;\;\frac{\left(\frac{27464.7644705}{y} + \left(\frac{230661.510616}{y \cdot y} + \mathsf{fma}\left(x, y, \frac{t}{{y}^{3}}\right)\right)\right) + z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.20000000000000009e38 or 1.8500000000000001e82 < y Initial program 0.5%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.4%
Taylor expanded in y around inf
Applied rewrites77.5%
if -1.20000000000000009e38 < y < 1.54999999999999998e44Initial program 96.3%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites96.3%
Applied rewrites96.3%
if 1.54999999999999998e44 < y < 1.8500000000000001e82Initial program 2.4%
Taylor expanded in x around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
Applied rewrites3.0%
Taylor expanded in a around inf
Applied rewrites88.8%
Final simplification88.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ a y) 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) / (((((((a + y) * 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) / (((((((a + y) * 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) / (((((((a + y) * 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(a + y) * 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) / (((((((a + y) * 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[(a + y), $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(a + y\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 89.3%
Taylor expanded in y around 0
lower-/.f6447.5
Applied rewrites47.5%
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 a 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
+-commutativeN/A
Applied rewrites0.0%
Taylor expanded in y around inf
Applied rewrites75.7%
Taylor expanded in x around 0
Applied rewrites20.4%
Final simplification36.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -8.2e+37)
t_1
(if (<= y 3.4e+47)
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ 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 = (z / y) + x;
double tmp;
if (y <= -8.2e+37) {
tmp = t_1;
} else if (y <= 3.4e+47) {
tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = (z / y) + x
if (y <= (-8.2d+37)) then
tmp = t_1
else if (y <= 3.4d+47) then
tmp = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i)
else
tmp = t_1
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 t_1 = (z / y) + x;
double tmp;
if (y <= -8.2e+37) {
tmp = t_1;
} else if (y <= 3.4e+47) {
tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z / y) + x tmp = 0 if y <= -8.2e+37: tmp = t_1 elif y <= 3.4e+47: tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((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(Float64(z / y) + x) tmp = 0.0 if (y <= -8.2e+37) tmp = t_1; elseif (y <= 3.4e+47) tmp = 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(a + y) * y) + b) * y) + c) * y) + i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z / y) + x; tmp = 0.0; if (y <= -8.2e+37) tmp = t_1; elseif (y <= 3.4e+47) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -8.2e+37], t$95$1, If[LessEqual[y, 3.4e+47], 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[(a + y), $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 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+47}:\\
\;\;\;\;\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(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.1999999999999996e37 or 3.3999999999999998e47 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.6%
Taylor expanded in y around inf
Applied rewrites73.7%
if -8.1999999999999996e37 < y < 3.3999999999999998e47Initial program 95.0%
Final simplification85.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -8.2e+37)
t_1
(if (<= y 3.4e+47)
(/
1.0
(/
(fma (fma (fma (+ a y) y b) y c) y i)
(fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t)))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z / y) + x;
double tmp;
if (y <= -8.2e+37) {
tmp = t_1;
} else if (y <= 3.4e+47) {
tmp = 1.0 / (fma(fma(fma((a + y), y, b), y, c), y, i) / fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -8.2e+37) tmp = t_1; elseif (y <= 3.4e+47) tmp = Float64(1.0 / Float64(fma(fma(fma(Float64(a + y), y, b), y, c), y, i) / fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -8.2e+37], t$95$1, If[LessEqual[y, 3.4e+47], N[(1.0 / N[(N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision] / N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+47}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.1999999999999996e37 or 3.3999999999999998e47 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.6%
Taylor expanded in y around inf
Applied rewrites73.7%
if -8.1999999999999996e37 < y < 3.3999999999999998e47Initial program 95.0%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6494.8
Applied rewrites94.8%
Final simplification85.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -8.2e+37)
t_1
(if (<= y 3.4e+47)
(*
(/ -1.0 (fma (fma (fma (+ a y) y b) y c) y i))
(- (fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t)))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z / y) + x;
double tmp;
if (y <= -8.2e+37) {
tmp = t_1;
} else if (y <= 3.4e+47) {
tmp = (-1.0 / fma(fma(fma((a + y), y, b), y, c), y, i)) * -fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -8.2e+37) tmp = t_1; elseif (y <= 3.4e+47) tmp = Float64(Float64(-1.0 / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)) * Float64(-fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -8.2e+37], t$95$1, If[LessEqual[y, 3.4e+47], N[(N[(-1.0 / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision] * (-N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision])), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)} \cdot \left(-\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.1999999999999996e37 or 3.3999999999999998e47 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.6%
Taylor expanded in y around inf
Applied rewrites73.7%
if -8.1999999999999996e37 < y < 3.3999999999999998e47Initial program 95.0%
lift-/.f64N/A
frac-2negN/A
div-invN/A
lower-*.f64N/A
Applied rewrites94.7%
Final simplification85.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -8.2e+37)
t_1
(if (<= y 1.95e+47)
(/
(fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma 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 = (z / y) + x;
double tmp;
if (y <= -8.2e+37) {
tmp = t_1;
} else if (y <= 1.95e+47) {
tmp = fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(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(Float64(z / y) + x) tmp = 0.0 if (y <= -8.2e+37) tmp = t_1; elseif (y <= 1.95e+47) tmp = Float64(fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(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[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -8.2e+37], t$95$1, If[LessEqual[y, 1.95e+47], N[(N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(y * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+47}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.1999999999999996e37 or 1.95000000000000013e47 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.6%
Taylor expanded in y around inf
Applied rewrites73.7%
if -8.1999999999999996e37 < y < 1.95000000000000013e47Initial program 95.0%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites90.9%
Final simplification83.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -2.2e+36)
t_1
(if (<= y 1.35e+46)
(/
(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 = (z / y) + x;
double tmp;
if (y <= -2.2e+36) {
tmp = t_1;
} else if (y <= 1.35e+46) {
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(Float64(z / y) + x) tmp = 0.0 if (y <= -2.2e+36) tmp = t_1; elseif (y <= 1.35e+46) 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[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -2.2e+36], t$95$1, If[LessEqual[y, 1.35e+46], 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 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+46}:\\
\;\;\;\;\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 < -2.2e36 or 1.3500000000000001e46 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.6%
Taylor expanded in y around inf
Applied rewrites73.7%
if -2.2e36 < y < 1.3500000000000001e46Initial program 95.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 rewrites90.4%
Final simplification83.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -9.5e+35)
t_1
(if (<= y 8.2e+59)
(/
(+ (* 230661.510616 y) t)
(+ (* (+ (* (+ (* (+ 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 = (z / y) + x;
double tmp;
if (y <= -9.5e+35) {
tmp = t_1;
} else if (y <= 8.2e+59) {
tmp = ((230661.510616 * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = (z / y) + x
if (y <= (-9.5d+35)) then
tmp = t_1
else if (y <= 8.2d+59) then
tmp = ((230661.510616d0 * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i)
else
tmp = t_1
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 t_1 = (z / y) + x;
double tmp;
if (y <= -9.5e+35) {
tmp = t_1;
} else if (y <= 8.2e+59) {
tmp = ((230661.510616 * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z / y) + x tmp = 0 if y <= -9.5e+35: tmp = t_1 elif y <= 8.2e+59: tmp = ((230661.510616 * y) + t) / (((((((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(Float64(z / y) + x) tmp = 0.0 if (y <= -9.5e+35) tmp = t_1; elseif (y <= 8.2e+59) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(a + y) * y) + b) * y) + c) * y) + i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z / y) + x; tmp = 0.0; if (y <= -9.5e+35) tmp = t_1; elseif (y <= 8.2e+59) tmp = ((230661.510616 * y) + t) / (((((((a + y) * y) + b) * y) + c) * y) + i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -9.5e+35], t$95$1, If[LessEqual[y, 8.2e+59], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(a + y), $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 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\left(\left(\left(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.50000000000000062e35 or 8.2e59 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.5%
Taylor expanded in y around inf
Applied rewrites75.7%
if -9.50000000000000062e35 < y < 8.2e59Initial program 93.1%
Taylor expanded in y around 0
Applied rewrites78.2%
Final simplification77.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -9.5e+35)
t_1
(if (<= y 8.2e+59)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ 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 = (z / y) + x;
double tmp;
if (y <= -9.5e+35) {
tmp = t_1;
} else if (y <= 8.2e+59) {
tmp = fma(230661.510616, y, t) / (((((((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(Float64(z / y) + x) tmp = 0.0 if (y <= -9.5e+35) tmp = t_1; elseif (y <= 8.2e+59) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(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[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -9.5e+35], t$95$1, If[LessEqual[y, 8.2e+59], N[(N[(230661.510616 * y + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(a + y), $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 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(a + y\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.50000000000000062e35 or 8.2e59 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.5%
Taylor expanded in y around inf
Applied rewrites75.7%
if -9.50000000000000062e35 < y < 8.2e59Initial program 93.1%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6478.2
Applied rewrites78.2%
Final simplification77.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -9.5e+35)
t_1
(if (<= y 8.2e+59)
(/ (+ (* 230661.510616 y) t) (fma y (fma y (fma a y b) c) i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z / y) + x;
double tmp;
if (y <= -9.5e+35) {
tmp = t_1;
} else if (y <= 8.2e+59) {
tmp = ((230661.510616 * y) + t) / fma(y, fma(y, fma(a, y, b), c), i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -9.5e+35) tmp = t_1; elseif (y <= 8.2e+59) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(y, fma(y, fma(a, y, b), c), i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -9.5e+35], t$95$1, If[LessEqual[y, 8.2e+59], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(y * N[(y * N[(a * y + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(a, y, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.50000000000000062e35 or 8.2e59 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.5%
Taylor expanded in y around inf
Applied rewrites75.7%
if -9.50000000000000062e35 < y < 8.2e59Initial program 93.1%
Taylor expanded in y around 0
Applied rewrites78.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6477.7
Applied rewrites77.7%
Final simplification76.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -9.2e+35)
t_1
(if (<= y 8.2e+59)
(/ (+ (* 230661.510616 y) t) (fma y (fma b y c) i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z / y) + x;
double tmp;
if (y <= -9.2e+35) {
tmp = t_1;
} else if (y <= 8.2e+59) {
tmp = ((230661.510616 * y) + t) / fma(y, fma(b, y, c), i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -9.2e+35) tmp = t_1; elseif (y <= 8.2e+59) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(y, fma(b, y, c), i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -9.2e+35], t$95$1, If[LessEqual[y, 8.2e+59], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(y * N[(b * y + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(y, \mathsf{fma}\left(b, y, c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.1999999999999993e35 or 8.2e59 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.5%
Taylor expanded in y around inf
Applied rewrites75.7%
if -9.1999999999999993e35 < y < 8.2e59Initial program 93.1%
Taylor expanded in y around 0
Applied rewrites78.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6475.8
Applied rewrites75.8%
Final simplification75.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -8.5e+35)
t_1
(if (<= y 3.35e+44) (/ (+ (* 230661.510616 y) t) (fma 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 = (z / y) + x;
double tmp;
if (y <= -8.5e+35) {
tmp = t_1;
} else if (y <= 3.35e+44) {
tmp = ((230661.510616 * y) + t) / fma(c, y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -8.5e+35) tmp = t_1; elseif (y <= 3.35e+44) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(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[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -8.5e+35], t$95$1, If[LessEqual[y, 3.35e+44], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.35 \cdot 10^{+44}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.4999999999999995e35 or 3.35000000000000018e44 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.6%
Taylor expanded in y around inf
Applied rewrites73.7%
if -8.4999999999999995e35 < y < 3.35000000000000018e44Initial program 95.0%
Taylor expanded in y around 0
Applied rewrites79.8%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6471.4
Applied rewrites71.4%
Final simplification72.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -6.4e+35)
t_1
(if (<= y 7.5e-23) (/ (+ (* 230661.510616 y) t) i) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z / y) + x;
double tmp;
if (y <= -6.4e+35) {
tmp = t_1;
} else if (y <= 7.5e-23) {
tmp = ((230661.510616 * y) + t) / i;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = (z / y) + x
if (y <= (-6.4d+35)) then
tmp = t_1
else if (y <= 7.5d-23) then
tmp = ((230661.510616d0 * y) + t) / i
else
tmp = t_1
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 t_1 = (z / y) + x;
double tmp;
if (y <= -6.4e+35) {
tmp = t_1;
} else if (y <= 7.5e-23) {
tmp = ((230661.510616 * y) + t) / i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z / y) + x tmp = 0 if y <= -6.4e+35: tmp = t_1 elif y <= 7.5e-23: tmp = ((230661.510616 * y) + t) / i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -6.4e+35) tmp = t_1; elseif (y <= 7.5e-23) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z / y) + x; tmp = 0.0; if (y <= -6.4e+35) tmp = t_1; elseif (y <= 7.5e-23) tmp = ((230661.510616 * y) + t) / i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -6.4e+35], t$95$1, If[LessEqual[y, 7.5e-23], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / i), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.39999999999999965e35 or 7.4999999999999998e-23 < y Initial program 10.1%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites8.5%
Taylor expanded in y around inf
Applied rewrites65.9%
if -6.39999999999999965e35 < y < 7.4999999999999998e-23Initial program 96.0%
Taylor expanded in i 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
+-commutativeN/A
*-commutativeN/A
lower-fma.f6463.8
Applied rewrites63.8%
Taylor expanded in y around 0
Applied rewrites60.3%
Final simplification63.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (/ z y) x)))
(if (<= y -6.4e+35)
t_1
(if (<= y 7.5e-23) (/ (fma 230661.510616 y t) i) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z / y) + x;
double tmp;
if (y <= -6.4e+35) {
tmp = t_1;
} else if (y <= 7.5e-23) {
tmp = fma(230661.510616, y, t) / i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -6.4e+35) tmp = t_1; elseif (y <= 7.5e-23) tmp = Float64(fma(230661.510616, y, t) / i); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -6.4e+35], t$95$1, If[LessEqual[y, 7.5e-23], N[(N[(230661.510616 * y + t), $MachinePrecision] / i), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.39999999999999965e35 or 7.4999999999999998e-23 < y Initial program 10.1%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites8.5%
Taylor expanded in y around inf
Applied rewrites65.9%
if -6.39999999999999965e35 < y < 7.4999999999999998e-23Initial program 96.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6455.0
Applied rewrites55.0%
Taylor expanded in i around inf
Applied rewrites60.3%
Final simplification63.0%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (/ z y) x))) (if (<= y -6.4e+35) t_1 (if (<= y 8.2e+59) (/ t i) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z / y) + x;
double tmp;
if (y <= -6.4e+35) {
tmp = t_1;
} else if (y <= 8.2e+59) {
tmp = t / i;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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) :: t_1
real(8) :: tmp
t_1 = (z / y) + x
if (y <= (-6.4d+35)) then
tmp = t_1
else if (y <= 8.2d+59) then
tmp = t / i
else
tmp = t_1
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 t_1 = (z / y) + x;
double tmp;
if (y <= -6.4e+35) {
tmp = t_1;
} else if (y <= 8.2e+59) {
tmp = t / i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z / y) + x tmp = 0 if y <= -6.4e+35: tmp = t_1 elif y <= 8.2e+59: tmp = t / i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z / y) + x) tmp = 0.0 if (y <= -6.4e+35) tmp = t_1; elseif (y <= 8.2e+59) tmp = Float64(t / i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z / y) + x; tmp = 0.0; if (y <= -6.4e+35) tmp = t_1; elseif (y <= 8.2e+59) tmp = t / i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -6.4e+35], t$95$1, If[LessEqual[y, 8.2e+59], N[(t / i), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{y} + x\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.39999999999999965e35 or 8.2e59 < y Initial program 0.6%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites0.5%
Taylor expanded in y around inf
Applied rewrites75.7%
if -6.39999999999999965e35 < y < 8.2e59Initial program 93.1%
Taylor expanded in y around 0
lower-/.f6449.7
Applied rewrites49.7%
Final simplification60.8%
(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;
}
real(8) function code(x, y, z, t, a, b, c, i)
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 53.7%
Taylor expanded in a 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
+-commutativeN/A
Applied rewrites51.3%
Taylor expanded in y around inf
Applied rewrites34.6%
Taylor expanded in x around 0
Applied rewrites12.2%
herbie shell --seed 2024296
(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)))