
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
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
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
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
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma (/ (- z t) (- z a)) y x))
double code(double x, double y, double z, double t, double a) {
return fma(((z - t) / (z - a)), y, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(z - t) / Float64(z - a)), y, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z - t}{z - a}, y, x\right)
\end{array}
Initial program 84.4%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
fma-defineN/A
fma-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.7%
Applied egg-rr98.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y (- z a)))) (t_2 (/ (* (- z t) y) (- z a))))
(if (<= t_2 -2e+113)
t_1
(if (<= t_2 5e+142) (+ x (/ (* z y) (- z a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (z - a));
double t_2 = ((z - t) * y) / (z - a);
double tmp;
if (t_2 <= -2e+113) {
tmp = t_1;
} else if (t_2 <= 5e+142) {
tmp = x + ((z * y) / (z - a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z - t) * (y / (z - a))
t_2 = ((z - t) * y) / (z - a)
if (t_2 <= (-2d+113)) then
tmp = t_1
else if (t_2 <= 5d+142) then
tmp = x + ((z * y) / (z - a))
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 t_1 = (z - t) * (y / (z - a));
double t_2 = ((z - t) * y) / (z - a);
double tmp;
if (t_2 <= -2e+113) {
tmp = t_1;
} else if (t_2 <= 5e+142) {
tmp = x + ((z * y) / (z - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / (z - a)) t_2 = ((z - t) * y) / (z - a) tmp = 0 if t_2 <= -2e+113: tmp = t_1 elif t_2 <= 5e+142: tmp = x + ((z * y) / (z - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(z - a))) t_2 = Float64(Float64(Float64(z - t) * y) / Float64(z - a)) tmp = 0.0 if (t_2 <= -2e+113) tmp = t_1; elseif (t_2 <= 5e+142) tmp = Float64(x + Float64(Float64(z * y) / Float64(z - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / (z - a)); t_2 = ((z - t) * y) / (z - a); tmp = 0.0; if (t_2 <= -2e+113) tmp = t_1; elseif (t_2 <= 5e+142) tmp = x + ((z * y) / (z - a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+113], t$95$1, If[LessEqual[t$95$2, 5e+142], N[(x + N[(N[(z * y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{z - a}\\
t_2 := \frac{\left(z - t\right) \cdot y}{z - a}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+142}:\\
\;\;\;\;x + \frac{z \cdot y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -2e113 or 5.0000000000000001e142 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 59.1%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
fma-defineN/A
fma-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.0%
Applied egg-rr98.0%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6481.5%
Simplified81.5%
if -2e113 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.0000000000000001e142Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f6488.5%
Simplified88.5%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.2e+92)
(+ y x)
(if (<= z -1.3e-21)
(* (- z t) (/ y (- z a)))
(if (<= z 4.9e-14) (+ x (/ t (/ a y))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+92) {
tmp = y + x;
} else if (z <= -1.3e-21) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 4.9e-14) {
tmp = x + (t / (a / y));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-8.2d+92)) then
tmp = y + x
else if (z <= (-1.3d-21)) then
tmp = (z - t) * (y / (z - a))
else if (z <= 4.9d-14) then
tmp = x + (t / (a / y))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+92) {
tmp = y + x;
} else if (z <= -1.3e-21) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 4.9e-14) {
tmp = x + (t / (a / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.2e+92: tmp = y + x elif z <= -1.3e-21: tmp = (z - t) * (y / (z - a)) elif z <= 4.9e-14: tmp = x + (t / (a / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.2e+92) tmp = Float64(y + x); elseif (z <= -1.3e-21) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (z <= 4.9e-14) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.2e+92) tmp = y + x; elseif (z <= -1.3e-21) tmp = (z - t) * (y / (z - a)); elseif (z <= 4.9e-14) tmp = x + (t / (a / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.2e+92], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.3e-21], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e-14], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+92}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-21}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-14}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -8.20000000000000047e92 or 4.89999999999999995e-14 < z Initial program 74.6%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6481.2%
Simplified81.2%
if -8.20000000000000047e92 < z < -1.30000000000000009e-21Initial program 75.3%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
fma-defineN/A
fma-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.9%
Simplified74.9%
if -1.30000000000000009e-21 < z < 4.89999999999999995e-14Initial program 96.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6476.4%
Simplified76.4%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6477.3%
Applied egg-rr77.3%
+-commutativeN/A
+-lowering-+.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6478.1%
Applied egg-rr78.1%
Final simplification79.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.8e+25) (+ x (* y (/ z (- z a)))) (if (<= z 2.15e-13) (+ x (/ t (/ a y))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.8e+25) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 2.15e-13) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-4.8d+25)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 2.15d-13) then
tmp = x + (t / (a / y))
else
tmp = x + (y * (1.0d0 - (t / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.8e+25) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 2.15e-13) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.8e+25: tmp = x + (y * (z / (z - a))) elif z <= 2.15e-13: tmp = x + (t / (a / y)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.8e+25) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 2.15e-13) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.8e+25) tmp = x + (y * (z / (z - a))); elseif (z <= 2.15e-13) tmp = x + (t / (a / y)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.8e+25], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e-13], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -4.79999999999999992e25Initial program 69.4%
Taylor expanded in t around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6487.8%
Simplified87.8%
if -4.79999999999999992e25 < z < 2.1499999999999999e-13Initial program 95.2%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6474.8%
Simplified74.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6477.1%
Applied egg-rr77.1%
+-commutativeN/A
+-lowering-+.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6477.9%
Applied egg-rr77.9%
if 2.1499999999999999e-13 < z Initial program 79.1%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6493.3%
Simplified93.3%
Final simplification84.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (* y (- 1.0 (/ t z)))))) (if (<= z -6.5e+37) t_1 (if (<= z 4.6e-9) (+ x (/ t (/ a y))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -6.5e+37) {
tmp = t_1;
} else if (z <= 4.6e-9) {
tmp = x + (t / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x + (y * (1.0d0 - (t / z)))
if (z <= (-6.5d+37)) then
tmp = t_1
else if (z <= 4.6d-9) then
tmp = x + (t / (a / y))
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 t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -6.5e+37) {
tmp = t_1;
} else if (z <= 4.6e-9) {
tmp = x + (t / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -6.5e+37: tmp = t_1 elif z <= 4.6e-9: tmp = x + (t / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -6.5e+37) tmp = t_1; elseif (z <= 4.6e-9) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -6.5e+37) tmp = t_1; elseif (z <= 4.6e-9) tmp = x + (t / (a / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+37], t$95$1, If[LessEqual[z, 4.6e-9], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-9}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.4999999999999998e37 or 4.5999999999999998e-9 < z Initial program 75.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6486.7%
Simplified86.7%
if -6.4999999999999998e37 < z < 4.5999999999999998e-9Initial program 94.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6474.2%
Simplified74.2%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6476.5%
Applied egg-rr76.5%
+-commutativeN/A
+-lowering-+.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6477.3%
Applied egg-rr77.3%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.2e+77) (+ y x) (if (<= z 1.75e-13) (+ x (/ t (/ a y))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+77) {
tmp = y + x;
} else if (z <= 1.75e-13) {
tmp = x + (t / (a / y));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-9.2d+77)) then
tmp = y + x
else if (z <= 1.75d-13) then
tmp = x + (t / (a / y))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+77) {
tmp = y + x;
} else if (z <= 1.75e-13) {
tmp = x + (t / (a / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.2e+77: tmp = y + x elif z <= 1.75e-13: tmp = x + (t / (a / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e+77) tmp = Float64(y + x); elseif (z <= 1.75e-13) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.2e+77) tmp = y + x; elseif (z <= 1.75e-13) tmp = x + (t / (a / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+77], N[(y + x), $MachinePrecision], If[LessEqual[z, 1.75e-13], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+77}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -9.19999999999999979e77 or 1.7500000000000001e-13 < z Initial program 75.0%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6480.8%
Simplified80.8%
if -9.19999999999999979e77 < z < 1.7500000000000001e-13Initial program 92.9%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6471.5%
Simplified71.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6473.6%
Applied egg-rr73.6%
+-commutativeN/A
+-lowering-+.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6474.3%
Applied egg-rr74.3%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.2e+77) (+ y x) (if (<= z 2.6e+54) (+ x (* y (/ t a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+77) {
tmp = y + x;
} else if (z <= 2.6e+54) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-8.2d+77)) then
tmp = y + x
else if (z <= 2.6d+54) then
tmp = x + (y * (t / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+77) {
tmp = y + x;
} else if (z <= 2.6e+54) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.2e+77: tmp = y + x elif z <= 2.6e+54: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.2e+77) tmp = Float64(y + x); elseif (z <= 2.6e+54) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.2e+77) tmp = y + x; elseif (z <= 2.6e+54) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.2e+77], N[(y + x), $MachinePrecision], If[LessEqual[z, 2.6e+54], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+77}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+54}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -8.2000000000000002e77 or 2.60000000000000007e54 < z Initial program 72.6%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6481.8%
Simplified81.8%
if -8.2000000000000002e77 < z < 2.60000000000000007e54Initial program 92.9%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6471.1%
Simplified71.1%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6473.6%
Applied egg-rr73.6%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.82e+84) (+ y x) (if (<= z 4.3e-14) (+ x (* t (/ y a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.82e+84) {
tmp = y + x;
} else if (z <= 4.3e-14) {
tmp = x + (t * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-1.82d+84)) then
tmp = y + x
else if (z <= 4.3d-14) then
tmp = x + (t * (y / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.82e+84) {
tmp = y + x;
} else if (z <= 4.3e-14) {
tmp = x + (t * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.82e+84: tmp = y + x elif z <= 4.3e-14: tmp = x + (t * (y / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.82e+84) tmp = Float64(y + x); elseif (z <= 4.3e-14) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.82e+84) tmp = y + x; elseif (z <= 4.3e-14) tmp = x + (t * (y / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.82e+84], N[(y + x), $MachinePrecision], If[LessEqual[z, 4.3e-14], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.82 \cdot 10^{+84}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-14}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.8200000000000001e84 or 4.29999999999999998e-14 < z Initial program 75.0%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6480.8%
Simplified80.8%
if -1.8200000000000001e84 < z < 4.29999999999999998e-14Initial program 92.9%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6471.5%
Simplified71.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6473.6%
Applied egg-rr73.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.5e+106) (* y (/ (- t z) a)) (if (<= t 1.95e+207) (+ y x) (* y (- 1.0 (/ t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+106) {
tmp = y * ((t - z) / a);
} else if (t <= 1.95e+207) {
tmp = y + x;
} else {
tmp = y * (1.0 - (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (t <= (-2.5d+106)) then
tmp = y * ((t - z) / a)
else if (t <= 1.95d+207) then
tmp = y + x
else
tmp = y * (1.0d0 - (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+106) {
tmp = y * ((t - z) / a);
} else if (t <= 1.95e+207) {
tmp = y + x;
} else {
tmp = y * (1.0 - (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.5e+106: tmp = y * ((t - z) / a) elif t <= 1.95e+207: tmp = y + x else: tmp = y * (1.0 - (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.5e+106) tmp = Float64(y * Float64(Float64(t - z) / a)); elseif (t <= 1.95e+207) tmp = Float64(y + x); else tmp = Float64(y * Float64(1.0 - Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.5e+106) tmp = y * ((t - z) / a); elseif (t <= 1.95e+207) tmp = y + x; else tmp = y * (1.0 - (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.5e+106], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+207], N[(y + x), $MachinePrecision], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+207}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if t < -2.4999999999999999e106Initial program 76.3%
Taylor expanded in a around inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.0%
Simplified67.0%
--lowering--.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.1%
Applied egg-rr67.1%
Taylor expanded in x around 0
mul-1-negN/A
associate-/l*N/A
div-subN/A
distribute-lft-out--N/A
associate-/l*N/A
associate-*r/N/A
*-commutativeN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-outN/A
mul-1-negN/A
remove-double-negN/A
sub-negN/A
*-commutativeN/A
associate-*r/N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6448.6%
Simplified48.6%
*-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
clear-numN/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6448.7%
Applied egg-rr48.7%
if -2.4999999999999999e106 < t < 1.94999999999999986e207Initial program 86.3%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6469.1%
Simplified69.1%
if 1.94999999999999986e207 < t Initial program 82.0%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6466.2%
Simplified66.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6460.1%
Simplified60.1%
Final simplification65.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.9e+106) (* (/ y a) (- t z)) (if (<= t 1.82e+208) (+ y x) (* y (- 1.0 (/ t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.9e+106) {
tmp = (y / a) * (t - z);
} else if (t <= 1.82e+208) {
tmp = y + x;
} else {
tmp = y * (1.0 - (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (t <= (-2.9d+106)) then
tmp = (y / a) * (t - z)
else if (t <= 1.82d+208) then
tmp = y + x
else
tmp = y * (1.0d0 - (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.9e+106) {
tmp = (y / a) * (t - z);
} else if (t <= 1.82e+208) {
tmp = y + x;
} else {
tmp = y * (1.0 - (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.9e+106: tmp = (y / a) * (t - z) elif t <= 1.82e+208: tmp = y + x else: tmp = y * (1.0 - (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.9e+106) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (t <= 1.82e+208) tmp = Float64(y + x); else tmp = Float64(y * Float64(1.0 - Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.9e+106) tmp = (y / a) * (t - z); elseif (t <= 1.82e+208) tmp = y + x; else tmp = y * (1.0 - (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.9e+106], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.82e+208], N[(y + x), $MachinePrecision], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+106}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;t \leq 1.82 \cdot 10^{+208}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if t < -2.9000000000000002e106Initial program 76.3%
Taylor expanded in a around inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.0%
Simplified67.0%
--lowering--.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.1%
Applied egg-rr67.1%
Taylor expanded in x around 0
mul-1-negN/A
associate-/l*N/A
div-subN/A
distribute-lft-out--N/A
associate-/l*N/A
associate-*r/N/A
*-commutativeN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-outN/A
mul-1-negN/A
remove-double-negN/A
sub-negN/A
*-commutativeN/A
associate-*r/N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6448.6%
Simplified48.6%
if -2.9000000000000002e106 < t < 1.81999999999999999e208Initial program 86.3%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6469.1%
Simplified69.1%
if 1.81999999999999999e208 < t Initial program 82.0%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6466.2%
Simplified66.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6460.1%
Simplified60.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.9e+106) (* t (/ y a)) (if (<= t 2.55e+203) (+ y x) (* y (- 1.0 (/ t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.9e+106) {
tmp = t * (y / a);
} else if (t <= 2.55e+203) {
tmp = y + x;
} else {
tmp = y * (1.0 - (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (t <= (-2.9d+106)) then
tmp = t * (y / a)
else if (t <= 2.55d+203) then
tmp = y + x
else
tmp = y * (1.0d0 - (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.9e+106) {
tmp = t * (y / a);
} else if (t <= 2.55e+203) {
tmp = y + x;
} else {
tmp = y * (1.0 - (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.9e+106: tmp = t * (y / a) elif t <= 2.55e+203: tmp = y + x else: tmp = y * (1.0 - (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.9e+106) tmp = Float64(t * Float64(y / a)); elseif (t <= 2.55e+203) tmp = Float64(y + x); else tmp = Float64(y * Float64(1.0 - Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.9e+106) tmp = t * (y / a); elseif (t <= 2.55e+203) tmp = y + x; else tmp = y * (1.0 - (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.9e+106], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e+203], N[(y + x), $MachinePrecision], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+106}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{+203}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if t < -2.9000000000000002e106Initial program 76.3%
Taylor expanded in a around inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.0%
Simplified67.0%
--lowering--.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.1%
Applied egg-rr67.1%
Taylor expanded in x around 0
mul-1-negN/A
associate-/l*N/A
div-subN/A
distribute-lft-out--N/A
associate-/l*N/A
associate-*r/N/A
*-commutativeN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-outN/A
mul-1-negN/A
remove-double-negN/A
sub-negN/A
*-commutativeN/A
associate-*r/N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6448.6%
Simplified48.6%
Taylor expanded in t around inf
Simplified48.4%
if -2.9000000000000002e106 < t < 2.5500000000000001e203Initial program 86.3%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6469.1%
Simplified69.1%
if 2.5500000000000001e203 < t Initial program 82.0%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6466.2%
Simplified66.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6460.1%
Simplified60.1%
Final simplification65.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e+18) (+ y x) (if (<= z 1.95e-13) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+18) {
tmp = y + x;
} else if (z <= 1.95e-13) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-9.5d+18)) then
tmp = y + x
else if (z <= 1.95d-13) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+18) {
tmp = y + x;
} else if (z <= 1.95e-13) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+18: tmp = y + x elif z <= 1.95e-13: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+18) tmp = Float64(y + x); elseif (z <= 1.95e-13) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+18) tmp = y + x; elseif (z <= 1.95e-13) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+18], N[(y + x), $MachinePrecision], If[LessEqual[z, 1.95e-13], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -9.5e18 or 1.95000000000000002e-13 < z Initial program 73.6%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6476.4%
Simplified76.4%
if -9.5e18 < z < 1.95000000000000002e-13Initial program 96.7%
Taylor expanded in x around inf
Simplified52.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
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
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
Initial program 84.4%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.3%
Applied egg-rr98.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.7e+245) y x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.7e+245) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-3.7d+245)) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.7e+245) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.7e+245: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.7e+245) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.7e+245) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.7e+245], y, x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+245}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.7000000000000001e245Initial program 43.5%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6478.8%
Simplified78.8%
Taylor expanded in y around inf
Simplified54.6%
if -3.7000000000000001e245 < z Initial program 87.0%
Taylor expanded in x around inf
Simplified53.5%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 84.4%
Taylor expanded in x around inf
Simplified51.7%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
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
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024138
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))
(+ x (/ (* y (- z t)) (- z a))))