
(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 23 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
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (<= t_1 (- INFINITY))
(+ x (* (- z t) (/ y (- z a))))
(if (<= t_1 4e+307) (+ x t_1) (* y (+ (/ (- z t) (- z a)) (/ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + ((z - t) * (y / (z - a)));
} else if (t_1 <= 4e+307) {
tmp = x + t_1;
} else {
tmp = y * (((z - t) / (z - a)) + (x / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + ((z - t) * (y / (z - a)));
} else if (t_1 <= 4e+307) {
tmp = x + t_1;
} else {
tmp = y * (((z - t) / (z - a)) + (x / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if t_1 <= -math.inf: tmp = x + ((z - t) * (y / (z - a))) elif t_1 <= 4e+307: tmp = x + t_1 else: tmp = y * (((z - t) / (z - a)) + (x / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); elseif (t_1 <= 4e+307) tmp = Float64(x + t_1); else tmp = Float64(y * Float64(Float64(Float64(z - t) / Float64(z - a)) + Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if (t_1 <= -Inf) tmp = x + ((z - t) * (y / (z - a))); elseif (t_1 <= 4e+307) tmp = x + t_1; else tmp = y * (((z - t) / (z - a)) + (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+307], N[(x + t$95$1), $MachinePrecision], N[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{z - t}{z - a} + \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0Initial program 36.0%
+-commutative36.0%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
associate-/l*36.0%
div-inv36.0%
*-commutative36.0%
associate-*r*99.9%
div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 3.99999999999999994e307Initial program 98.7%
if 3.99999999999999994e307 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 40.0%
Taylor expanded in y around inf 99.8%
associate--l+99.8%
div-sub99.8%
Simplified99.8%
Final simplification99.0%
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Initial program 83.6%
+-commutative83.6%
associate-/l*97.3%
fma-define97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 -5e+300) (not (<= t_1 4e+307)))
(/ y (/ (- z a) (- z t)))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -5e+300) || !(t_1 <= 4e+307)) {
tmp = y / ((z - a) / (z - t));
} else {
tmp = x + 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 = (y * (z - t)) / (z - a)
if ((t_1 <= (-5d+300)) .or. (.not. (t_1 <= 4d+307))) then
tmp = y / ((z - a) / (z - t))
else
tmp = x + 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 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -5e+300) || !(t_1 <= 4e+307)) {
tmp = y / ((z - a) / (z - t));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -5e+300) or not (t_1 <= 4e+307): tmp = y / ((z - a) / (z - t)) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= -5e+300) || !(t_1 <= 4e+307)) tmp = Float64(y / Float64(Float64(z - a) / Float64(z - t))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -5e+300) || ~((t_1 <= 4e+307))) tmp = y / ((z - a) / (z - t)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+300], N[Not[LessEqual[t$95$1, 4e+307]], $MachinePrecision]], N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+300} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+307}\right):\\
\;\;\;\;\frac{y}{\frac{z - a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5.00000000000000026e300 or 3.99999999999999994e307 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 40.1%
Taylor expanded in y around inf 90.0%
sub-div90.0%
clear-num90.0%
un-div-inv90.1%
Applied egg-rr90.1%
if -5.00000000000000026e300 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 3.99999999999999994e307Initial program 98.7%
Final simplification96.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 4e+307)))
(+ x (* (- z t) (/ y (- z a))))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 4e+307)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 4e+307)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 4e+307): tmp = x + ((z - t) * (y / (z - a))) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 4e+307)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 4e+307))) tmp = x + ((z - t) * (y / (z - a))); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 4e+307]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 4 \cdot 10^{+307}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 3.99999999999999994e307 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 38.2%
+-commutative38.2%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
fma-undefine99.8%
associate-/l*38.2%
div-inv38.2%
*-commutative38.2%
associate-*r*99.8%
div-inv99.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 3.99999999999999994e307Initial program 98.7%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.2e-18)
(+ y x)
(if (<= z -1.05e-253)
x
(if (<= z 5.8e-278)
(/ (* y t) a)
(if (<= z 1.12e-153)
x
(if (<= z 1.15e-133)
(* y (/ (- t) z))
(if (<= z 1.48e-118) x (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e-18) {
tmp = y + x;
} else if (z <= -1.05e-253) {
tmp = x;
} else if (z <= 5.8e-278) {
tmp = (y * t) / a;
} else if (z <= 1.12e-153) {
tmp = x;
} else if (z <= 1.15e-133) {
tmp = y * (-t / z);
} else if (z <= 1.48e-118) {
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 <= (-5.2d-18)) then
tmp = y + x
else if (z <= (-1.05d-253)) then
tmp = x
else if (z <= 5.8d-278) then
tmp = (y * t) / a
else if (z <= 1.12d-153) then
tmp = x
else if (z <= 1.15d-133) then
tmp = y * (-t / z)
else if (z <= 1.48d-118) 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 <= -5.2e-18) {
tmp = y + x;
} else if (z <= -1.05e-253) {
tmp = x;
} else if (z <= 5.8e-278) {
tmp = (y * t) / a;
} else if (z <= 1.12e-153) {
tmp = x;
} else if (z <= 1.15e-133) {
tmp = y * (-t / z);
} else if (z <= 1.48e-118) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.2e-18: tmp = y + x elif z <= -1.05e-253: tmp = x elif z <= 5.8e-278: tmp = (y * t) / a elif z <= 1.12e-153: tmp = x elif z <= 1.15e-133: tmp = y * (-t / z) elif z <= 1.48e-118: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e-18) tmp = Float64(y + x); elseif (z <= -1.05e-253) tmp = x; elseif (z <= 5.8e-278) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.12e-153) tmp = x; elseif (z <= 1.15e-133) tmp = Float64(y * Float64(Float64(-t) / z)); elseif (z <= 1.48e-118) 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 <= -5.2e-18) tmp = y + x; elseif (z <= -1.05e-253) tmp = x; elseif (z <= 5.8e-278) tmp = (y * t) / a; elseif (z <= 1.12e-153) tmp = x; elseif (z <= 1.15e-133) tmp = y * (-t / z); elseif (z <= 1.48e-118) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e-18], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.05e-253], x, If[LessEqual[z, 5.8e-278], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.12e-153], x, If[LessEqual[z, 1.15e-133], N[(y * N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.48e-118], x, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-253}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-278}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-153}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-133}:\\
\;\;\;\;y \cdot \frac{-t}{z}\\
\mathbf{elif}\;z \leq 1.48 \cdot 10^{-118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -5.2000000000000001e-18 or 1.4800000000000001e-118 < z Initial program 76.5%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -5.2000000000000001e-18 < z < -1.0499999999999999e-253 or 5.8e-278 < z < 1.12000000000000005e-153 or 1.15e-133 < z < 1.4800000000000001e-118Initial program 93.6%
Taylor expanded in x around inf 57.7%
if -1.0499999999999999e-253 < z < 5.8e-278Initial program 93.8%
+-commutative93.8%
associate-/l*82.1%
fma-define82.1%
Simplified82.1%
clear-num82.2%
associate-/r/82.1%
Applied egg-rr82.1%
Taylor expanded in t around inf 81.7%
mul-1-neg81.7%
distribute-frac-neg281.7%
*-commutative81.7%
associate-/l*69.6%
sub-neg69.6%
mul-1-neg69.6%
distribute-neg-in69.6%
mul-1-neg69.6%
remove-double-neg69.6%
Simplified69.6%
Taylor expanded in z around 0 76.4%
if 1.12000000000000005e-153 < z < 1.15e-133Initial program 99.7%
+-commutative99.7%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
clear-num100.0%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 78.9%
mul-1-neg78.9%
distribute-frac-neg278.9%
*-commutative78.9%
associate-/l*79.1%
sub-neg79.1%
mul-1-neg79.1%
distribute-neg-in79.1%
mul-1-neg79.1%
remove-double-neg79.1%
Simplified79.1%
Taylor expanded in z around inf 68.8%
associate-*r/68.8%
neg-mul-168.8%
Simplified68.8%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.9e-18)
(+ y x)
(if (<= z -9.2e-254)
x
(if (<= z 3.2e-271)
(/ (* y t) a)
(if (<= z 1.32e-154)
x
(if (<= z 1.85e-132)
(/ (* y (- t)) z)
(if (<= z 1.88e-118) x (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e-18) {
tmp = y + x;
} else if (z <= -9.2e-254) {
tmp = x;
} else if (z <= 3.2e-271) {
tmp = (y * t) / a;
} else if (z <= 1.32e-154) {
tmp = x;
} else if (z <= 1.85e-132) {
tmp = (y * -t) / z;
} else if (z <= 1.88e-118) {
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 <= (-1.9d-18)) then
tmp = y + x
else if (z <= (-9.2d-254)) then
tmp = x
else if (z <= 3.2d-271) then
tmp = (y * t) / a
else if (z <= 1.32d-154) then
tmp = x
else if (z <= 1.85d-132) then
tmp = (y * -t) / z
else if (z <= 1.88d-118) 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 <= -1.9e-18) {
tmp = y + x;
} else if (z <= -9.2e-254) {
tmp = x;
} else if (z <= 3.2e-271) {
tmp = (y * t) / a;
} else if (z <= 1.32e-154) {
tmp = x;
} else if (z <= 1.85e-132) {
tmp = (y * -t) / z;
} else if (z <= 1.88e-118) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e-18: tmp = y + x elif z <= -9.2e-254: tmp = x elif z <= 3.2e-271: tmp = (y * t) / a elif z <= 1.32e-154: tmp = x elif z <= 1.85e-132: tmp = (y * -t) / z elif z <= 1.88e-118: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e-18) tmp = Float64(y + x); elseif (z <= -9.2e-254) tmp = x; elseif (z <= 3.2e-271) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.32e-154) tmp = x; elseif (z <= 1.85e-132) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (z <= 1.88e-118) 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 <= -1.9e-18) tmp = y + x; elseif (z <= -9.2e-254) tmp = x; elseif (z <= 3.2e-271) tmp = (y * t) / a; elseif (z <= 1.32e-154) tmp = x; elseif (z <= 1.85e-132) tmp = (y * -t) / z; elseif (z <= 1.88e-118) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e-18], N[(y + x), $MachinePrecision], If[LessEqual[z, -9.2e-254], x, If[LessEqual[z, 3.2e-271], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.32e-154], x, If[LessEqual[z, 1.85e-132], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.88e-118], x, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-254}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-271}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-154}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-132}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;z \leq 1.88 \cdot 10^{-118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.8999999999999999e-18 or 1.88000000000000001e-118 < z Initial program 76.5%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -1.8999999999999999e-18 < z < -9.1999999999999995e-254 or 3.19999999999999978e-271 < z < 1.31999999999999994e-154 or 1.8500000000000001e-132 < z < 1.88000000000000001e-118Initial program 93.6%
Taylor expanded in x around inf 57.7%
if -9.1999999999999995e-254 < z < 3.19999999999999978e-271Initial program 93.8%
+-commutative93.8%
associate-/l*82.1%
fma-define82.1%
Simplified82.1%
clear-num82.2%
associate-/r/82.1%
Applied egg-rr82.1%
Taylor expanded in t around inf 81.7%
mul-1-neg81.7%
distribute-frac-neg281.7%
*-commutative81.7%
associate-/l*69.6%
sub-neg69.6%
mul-1-neg69.6%
distribute-neg-in69.6%
mul-1-neg69.6%
remove-double-neg69.6%
Simplified69.6%
Taylor expanded in z around 0 76.4%
if 1.31999999999999994e-154 < z < 1.8500000000000001e-132Initial program 99.7%
+-commutative99.7%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
clear-num100.0%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 78.9%
mul-1-neg78.9%
distribute-frac-neg278.9%
*-commutative78.9%
associate-/l*79.1%
sub-neg79.1%
mul-1-neg79.1%
distribute-neg-in79.1%
mul-1-neg79.1%
remove-double-neg79.1%
Simplified79.1%
Taylor expanded in z around inf 68.9%
associate-*r/68.9%
*-commutative68.9%
neg-mul-168.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ t z)))) (t_2 (* t (/ y (- a z)))))
(if (<= x -1.02e-141)
(+ y x)
(if (<= x -5.4e-186)
t_2
(if (<= x -2.3e-254)
t_1
(if (<= x 5.5e-231) t_2 (if (<= x 5e-14) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double t_2 = t * (y / (a - z));
double tmp;
if (x <= -1.02e-141) {
tmp = y + x;
} else if (x <= -5.4e-186) {
tmp = t_2;
} else if (x <= -2.3e-254) {
tmp = t_1;
} else if (x <= 5.5e-231) {
tmp = t_2;
} else if (x <= 5e-14) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (1.0d0 - (t / z))
t_2 = t * (y / (a - z))
if (x <= (-1.02d-141)) then
tmp = y + x
else if (x <= (-5.4d-186)) then
tmp = t_2
else if (x <= (-2.3d-254)) then
tmp = t_1
else if (x <= 5.5d-231) then
tmp = t_2
else if (x <= 5d-14) then
tmp = t_1
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 t_1 = y * (1.0 - (t / z));
double t_2 = t * (y / (a - z));
double tmp;
if (x <= -1.02e-141) {
tmp = y + x;
} else if (x <= -5.4e-186) {
tmp = t_2;
} else if (x <= -2.3e-254) {
tmp = t_1;
} else if (x <= 5.5e-231) {
tmp = t_2;
} else if (x <= 5e-14) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (t / z)) t_2 = t * (y / (a - z)) tmp = 0 if x <= -1.02e-141: tmp = y + x elif x <= -5.4e-186: tmp = t_2 elif x <= -2.3e-254: tmp = t_1 elif x <= 5.5e-231: tmp = t_2 elif x <= 5e-14: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(t / z))) t_2 = Float64(t * Float64(y / Float64(a - z))) tmp = 0.0 if (x <= -1.02e-141) tmp = Float64(y + x); elseif (x <= -5.4e-186) tmp = t_2; elseif (x <= -2.3e-254) tmp = t_1; elseif (x <= 5.5e-231) tmp = t_2; elseif (x <= 5e-14) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (t / z)); t_2 = t * (y / (a - z)); tmp = 0.0; if (x <= -1.02e-141) tmp = y + x; elseif (x <= -5.4e-186) tmp = t_2; elseif (x <= -2.3e-254) tmp = t_1; elseif (x <= 5.5e-231) tmp = t_2; elseif (x <= 5e-14) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.02e-141], N[(y + x), $MachinePrecision], If[LessEqual[x, -5.4e-186], t$95$2, If[LessEqual[x, -2.3e-254], t$95$1, If[LessEqual[x, 5.5e-231], t$95$2, If[LessEqual[x, 5e-14], t$95$1, N[(y + x), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
t_2 := t \cdot \frac{y}{a - z}\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{-141}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;x \leq -5.4 \cdot 10^{-186}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-254}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if x < -1.02e-141 or 5.0000000000000002e-14 < x Initial program 86.3%
Taylor expanded in z around inf 74.7%
+-commutative74.7%
Simplified74.7%
if -1.02e-141 < x < -5.3999999999999998e-186 or -2.2999999999999999e-254 < x < 5.49999999999999951e-231Initial program 81.9%
+-commutative81.9%
associate-/l*95.1%
fma-define95.1%
Simplified95.1%
clear-num93.8%
associate-/r/94.8%
Applied egg-rr94.8%
Taylor expanded in t around inf 51.4%
mul-1-neg51.4%
distribute-frac-neg251.4%
*-commutative51.4%
associate-/l*60.6%
sub-neg60.6%
mul-1-neg60.6%
distribute-neg-in60.6%
mul-1-neg60.6%
remove-double-neg60.6%
Simplified60.6%
Taylor expanded in y around 0 51.4%
associate-/l*60.2%
Simplified60.2%
if -5.3999999999999998e-186 < x < -2.2999999999999999e-254 or 5.49999999999999951e-231 < x < 5.0000000000000002e-14Initial program 78.4%
Taylor expanded in y around inf 76.3%
Taylor expanded in a around 0 61.4%
Final simplification68.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t a))))
(if (<= z -1.02e-8)
(+ y x)
(if (<= z -2.9e-254)
x
(if (<= z 1.22e-265)
t_1
(if (<= z 6.2e-165) x (if (<= z 7.2e-133) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double tmp;
if (z <= -1.02e-8) {
tmp = y + x;
} else if (z <= -2.9e-254) {
tmp = x;
} else if (z <= 1.22e-265) {
tmp = t_1;
} else if (z <= 6.2e-165) {
tmp = x;
} else if (z <= 7.2e-133) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y * (t / a)
if (z <= (-1.02d-8)) then
tmp = y + x
else if (z <= (-2.9d-254)) then
tmp = x
else if (z <= 1.22d-265) then
tmp = t_1
else if (z <= 6.2d-165) then
tmp = x
else if (z <= 7.2d-133) then
tmp = t_1
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 t_1 = y * (t / a);
double tmp;
if (z <= -1.02e-8) {
tmp = y + x;
} else if (z <= -2.9e-254) {
tmp = x;
} else if (z <= 1.22e-265) {
tmp = t_1;
} else if (z <= 6.2e-165) {
tmp = x;
} else if (z <= 7.2e-133) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / a) tmp = 0 if z <= -1.02e-8: tmp = y + x elif z <= -2.9e-254: tmp = x elif z <= 1.22e-265: tmp = t_1 elif z <= 6.2e-165: tmp = x elif z <= 7.2e-133: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / a)) tmp = 0.0 if (z <= -1.02e-8) tmp = Float64(y + x); elseif (z <= -2.9e-254) tmp = x; elseif (z <= 1.22e-265) tmp = t_1; elseif (z <= 6.2e-165) tmp = x; elseif (z <= 7.2e-133) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / a); tmp = 0.0; if (z <= -1.02e-8) tmp = y + x; elseif (z <= -2.9e-254) tmp = x; elseif (z <= 1.22e-265) tmp = t_1; elseif (z <= 6.2e-165) tmp = x; elseif (z <= 7.2e-133) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e-8], N[(y + x), $MachinePrecision], If[LessEqual[z, -2.9e-254], x, If[LessEqual[z, 1.22e-265], t$95$1, If[LessEqual[z, 6.2e-165], x, If[LessEqual[z, 7.2e-133], t$95$1, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{-8}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-254}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-265}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-165}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.02000000000000003e-8 or 7.2000000000000008e-133 < z Initial program 77.1%
Taylor expanded in z around inf 71.5%
+-commutative71.5%
Simplified71.5%
if -1.02000000000000003e-8 < z < -2.9e-254 or 1.22e-265 < z < 6.19999999999999992e-165Initial program 93.4%
Taylor expanded in x around inf 54.8%
if -2.9e-254 < z < 1.22e-265 or 6.19999999999999992e-165 < z < 7.2000000000000008e-133Initial program 95.8%
+-commutative95.8%
associate-/l*91.8%
fma-define91.8%
Simplified91.8%
clear-num91.9%
associate-/r/91.8%
Applied egg-rr91.8%
Taylor expanded in t around inf 79.9%
mul-1-neg79.9%
distribute-frac-neg279.9%
*-commutative79.9%
associate-/l*75.9%
sub-neg75.9%
mul-1-neg75.9%
distribute-neg-in75.9%
mul-1-neg75.9%
remove-double-neg75.9%
Simplified75.9%
Taylor expanded in z around 0 66.4%
Final simplification66.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= x -1.3e-142)
(and (not (<= x 4.8e-196))
(or (<= x 1.4e-151) (not (<= x 1.02e-116)))))
(+ x (* z (/ y (- z a))))
(* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.3e-142) || (!(x <= 4.8e-196) && ((x <= 1.4e-151) || !(x <= 1.02e-116)))) {
tmp = x + (z * (y / (z - a)));
} else {
tmp = y * ((z - t) / (z - a));
}
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 ((x <= (-1.3d-142)) .or. (.not. (x <= 4.8d-196)) .and. (x <= 1.4d-151) .or. (.not. (x <= 1.02d-116))) then
tmp = x + (z * (y / (z - a)))
else
tmp = y * ((z - t) / (z - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.3e-142) || (!(x <= 4.8e-196) && ((x <= 1.4e-151) || !(x <= 1.02e-116)))) {
tmp = x + (z * (y / (z - a)));
} else {
tmp = y * ((z - t) / (z - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.3e-142) or (not (x <= 4.8e-196) and ((x <= 1.4e-151) or not (x <= 1.02e-116))): tmp = x + (z * (y / (z - a))) else: tmp = y * ((z - t) / (z - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.3e-142) || (!(x <= 4.8e-196) && ((x <= 1.4e-151) || !(x <= 1.02e-116)))) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(z - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.3e-142) || (~((x <= 4.8e-196)) && ((x <= 1.4e-151) || ~((x <= 1.02e-116))))) tmp = x + (z * (y / (z - a))); else tmp = y * ((z - t) / (z - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.3e-142], And[N[Not[LessEqual[x, 4.8e-196]], $MachinePrecision], Or[LessEqual[x, 1.4e-151], N[Not[LessEqual[x, 1.02e-116]], $MachinePrecision]]]], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{-142} \lor \neg \left(x \leq 4.8 \cdot 10^{-196}\right) \land \left(x \leq 1.4 \cdot 10^{-151} \lor \neg \left(x \leq 1.02 \cdot 10^{-116}\right)\right):\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{z - a}\\
\end{array}
\end{array}
if x < -1.3e-142 or 4.80000000000000041e-196 < x < 1.4e-151 or 1.02e-116 < x Initial program 86.9%
+-commutative86.9%
associate-/l*97.8%
fma-define97.8%
Simplified97.8%
clear-num97.8%
associate-/r/97.7%
Applied egg-rr97.7%
Taylor expanded in t around 0 73.0%
associate-*l/82.1%
*-commutative82.1%
Simplified82.1%
if -1.3e-142 < x < 4.80000000000000041e-196 or 1.4e-151 < x < 1.02e-116Initial program 76.4%
+-commutative76.4%
associate-/l*96.1%
fma-define96.1%
Simplified96.1%
clear-num95.1%
associate-/r/95.9%
Applied egg-rr95.9%
Taylor expanded in y around inf 83.3%
div-sub83.3%
Simplified83.3%
Final simplification82.5%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.3e-141)
(+ x (/ z (/ (- z a) y)))
(if (or (<= x 4.8e-196) (and (not (<= x 5.3e-153)) (<= x 3.3e-115)))
(* y (/ (- z t) (- z a)))
(+ x (* z (/ y (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.3e-141) {
tmp = x + (z / ((z - a) / y));
} else if ((x <= 4.8e-196) || (!(x <= 5.3e-153) && (x <= 3.3e-115))) {
tmp = y * ((z - t) / (z - a));
} else {
tmp = x + (z * (y / (z - a)));
}
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 (x <= (-4.3d-141)) then
tmp = x + (z / ((z - a) / y))
else if ((x <= 4.8d-196) .or. (.not. (x <= 5.3d-153)) .and. (x <= 3.3d-115)) then
tmp = y * ((z - t) / (z - a))
else
tmp = x + (z * (y / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.3e-141) {
tmp = x + (z / ((z - a) / y));
} else if ((x <= 4.8e-196) || (!(x <= 5.3e-153) && (x <= 3.3e-115))) {
tmp = y * ((z - t) / (z - a));
} else {
tmp = x + (z * (y / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.3e-141: tmp = x + (z / ((z - a) / y)) elif (x <= 4.8e-196) or (not (x <= 5.3e-153) and (x <= 3.3e-115)): tmp = y * ((z - t) / (z - a)) else: tmp = x + (z * (y / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.3e-141) tmp = Float64(x + Float64(z / Float64(Float64(z - a) / y))); elseif ((x <= 4.8e-196) || (!(x <= 5.3e-153) && (x <= 3.3e-115))) tmp = Float64(y * Float64(Float64(z - t) / Float64(z - a))); else tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.3e-141) tmp = x + (z / ((z - a) / y)); elseif ((x <= 4.8e-196) || (~((x <= 5.3e-153)) && (x <= 3.3e-115))) tmp = y * ((z - t) / (z - a)); else tmp = x + (z * (y / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.3e-141], N[(x + N[(z / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 4.8e-196], And[N[Not[LessEqual[x, 5.3e-153]], $MachinePrecision], LessEqual[x, 3.3e-115]]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{z}{\frac{z - a}{y}}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-196} \lor \neg \left(x \leq 5.3 \cdot 10^{-153}\right) \land x \leq 3.3 \cdot 10^{-115}:\\
\;\;\;\;y \cdot \frac{z - t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\end{array}
\end{array}
if x < -4.29999999999999974e-141Initial program 86.5%
+-commutative86.5%
associate-/l*98.9%
fma-define98.9%
Simplified98.9%
clear-num98.9%
associate-/r/98.9%
Applied egg-rr98.9%
Taylor expanded in t around 0 72.9%
associate-*l/82.9%
*-commutative82.9%
Simplified82.9%
clear-num82.9%
un-div-inv82.9%
Applied egg-rr82.9%
if -4.29999999999999974e-141 < x < 4.80000000000000041e-196 or 5.2999999999999997e-153 < x < 3.2999999999999999e-115Initial program 76.4%
+-commutative76.4%
associate-/l*96.1%
fma-define96.1%
Simplified96.1%
clear-num95.1%
associate-/r/95.9%
Applied egg-rr95.9%
Taylor expanded in y around inf 83.3%
div-sub83.3%
Simplified83.3%
if 4.80000000000000041e-196 < x < 5.2999999999999997e-153 or 3.2999999999999999e-115 < x Initial program 87.3%
+-commutative87.3%
associate-/l*96.5%
fma-define96.5%
Simplified96.5%
clear-num96.5%
associate-/r/96.4%
Applied egg-rr96.4%
Taylor expanded in t around 0 73.1%
associate-*l/81.1%
*-commutative81.1%
Simplified81.1%
Final simplification82.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ z (/ (- z a) y)))))
(if (<= a -4.1e+61)
t_1
(if (<= a 2.1e-13)
(- x (* y (/ (- t z) z)))
(if (<= a 7.6e+61)
(* y (/ (- z t) (- z a)))
(if (<= a 9e+216) t_1 (+ x (* t (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z / ((z - a) / y));
double tmp;
if (a <= -4.1e+61) {
tmp = t_1;
} else if (a <= 2.1e-13) {
tmp = x - (y * ((t - z) / z));
} else if (a <= 7.6e+61) {
tmp = y * ((z - t) / (z - a));
} else if (a <= 9e+216) {
tmp = t_1;
} else {
tmp = x + (t * (y / a));
}
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 + (z / ((z - a) / y))
if (a <= (-4.1d+61)) then
tmp = t_1
else if (a <= 2.1d-13) then
tmp = x - (y * ((t - z) / z))
else if (a <= 7.6d+61) then
tmp = y * ((z - t) / (z - a))
else if (a <= 9d+216) then
tmp = t_1
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z / ((z - a) / y));
double tmp;
if (a <= -4.1e+61) {
tmp = t_1;
} else if (a <= 2.1e-13) {
tmp = x - (y * ((t - z) / z));
} else if (a <= 7.6e+61) {
tmp = y * ((z - t) / (z - a));
} else if (a <= 9e+216) {
tmp = t_1;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z / ((z - a) / y)) tmp = 0 if a <= -4.1e+61: tmp = t_1 elif a <= 2.1e-13: tmp = x - (y * ((t - z) / z)) elif a <= 7.6e+61: tmp = y * ((z - t) / (z - a)) elif a <= 9e+216: tmp = t_1 else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z / Float64(Float64(z - a) / y))) tmp = 0.0 if (a <= -4.1e+61) tmp = t_1; elseif (a <= 2.1e-13) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); elseif (a <= 7.6e+61) tmp = Float64(y * Float64(Float64(z - t) / Float64(z - a))); elseif (a <= 9e+216) tmp = t_1; else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z / ((z - a) / y)); tmp = 0.0; if (a <= -4.1e+61) tmp = t_1; elseif (a <= 2.1e-13) tmp = x - (y * ((t - z) / z)); elseif (a <= 7.6e+61) tmp = y * ((z - t) / (z - a)); elseif (a <= 9e+216) tmp = t_1; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.1e+61], t$95$1, If[LessEqual[a, 2.1e-13], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e+61], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+216], t$95$1, N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{z - a}{y}}\\
\mathbf{if}\;a \leq -4.1 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-13}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{+61}:\\
\;\;\;\;y \cdot \frac{z - t}{z - a}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+216}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -4.09999999999999972e61 or 7.5999999999999999e61 < a < 9.0000000000000005e216Initial program 81.0%
+-commutative81.0%
associate-/l*97.5%
fma-define97.5%
Simplified97.5%
clear-num96.6%
associate-/r/97.4%
Applied egg-rr97.4%
Taylor expanded in t around 0 73.1%
associate-*l/82.8%
*-commutative82.8%
Simplified82.8%
clear-num82.8%
un-div-inv82.8%
Applied egg-rr82.8%
if -4.09999999999999972e61 < a < 2.09999999999999989e-13Initial program 86.2%
Taylor expanded in a around 0 74.6%
+-commutative74.6%
associate-/l*86.1%
Simplified86.1%
if 2.09999999999999989e-13 < a < 7.5999999999999999e61Initial program 79.8%
+-commutative79.8%
associate-/l*99.8%
fma-define99.8%
Simplified99.8%
clear-num99.6%
associate-/r/99.4%
Applied egg-rr99.4%
Taylor expanded in y around inf 85.7%
div-sub85.7%
Simplified85.7%
if 9.0000000000000005e216 < a Initial program 77.8%
Taylor expanded in z around 0 85.5%
+-commutative85.5%
associate-/l*93.0%
Simplified93.0%
Final simplification85.3%
(FPCore (x y z t a)
:precision binary64
(if (or (<= x -1.36e-142)
(and (not (<= x 6.8e-215)) (or (<= x 5.3e-186) (not (<= x 1.3e-72)))))
(+ y x)
(* t (/ y (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.36e-142) || (!(x <= 6.8e-215) && ((x <= 5.3e-186) || !(x <= 1.3e-72)))) {
tmp = y + x;
} else {
tmp = t * (y / (a - 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 ((x <= (-1.36d-142)) .or. (.not. (x <= 6.8d-215)) .and. (x <= 5.3d-186) .or. (.not. (x <= 1.3d-72))) then
tmp = y + x
else
tmp = t * (y / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.36e-142) || (!(x <= 6.8e-215) && ((x <= 5.3e-186) || !(x <= 1.3e-72)))) {
tmp = y + x;
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.36e-142) or (not (x <= 6.8e-215) and ((x <= 5.3e-186) or not (x <= 1.3e-72))): tmp = y + x else: tmp = t * (y / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.36e-142) || (!(x <= 6.8e-215) && ((x <= 5.3e-186) || !(x <= 1.3e-72)))) tmp = Float64(y + x); else tmp = Float64(t * Float64(y / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.36e-142) || (~((x <= 6.8e-215)) && ((x <= 5.3e-186) || ~((x <= 1.3e-72))))) tmp = y + x; else tmp = t * (y / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.36e-142], And[N[Not[LessEqual[x, 6.8e-215]], $MachinePrecision], Or[LessEqual[x, 5.3e-186], N[Not[LessEqual[x, 1.3e-72]], $MachinePrecision]]]], N[(y + x), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.36 \cdot 10^{-142} \lor \neg \left(x \leq 6.8 \cdot 10^{-215}\right) \land \left(x \leq 5.3 \cdot 10^{-186} \lor \neg \left(x \leq 1.3 \cdot 10^{-72}\right)\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if x < -1.35999999999999993e-142 or 6.80000000000000003e-215 < x < 5.30000000000000022e-186 or 1.29999999999999998e-72 < x Initial program 84.0%
Taylor expanded in z around inf 75.6%
+-commutative75.6%
Simplified75.6%
if -1.35999999999999993e-142 < x < 6.80000000000000003e-215 or 5.30000000000000022e-186 < x < 1.29999999999999998e-72Initial program 82.8%
+-commutative82.8%
associate-/l*93.7%
fma-define93.7%
Simplified93.7%
clear-num92.8%
associate-/r/93.5%
Applied egg-rr93.5%
Taylor expanded in t around inf 45.3%
mul-1-neg45.3%
distribute-frac-neg245.3%
*-commutative45.3%
associate-/l*51.1%
sub-neg51.1%
mul-1-neg51.1%
distribute-neg-in51.1%
mul-1-neg51.1%
remove-double-neg51.1%
Simplified51.1%
Taylor expanded in y around 0 45.3%
associate-/l*52.7%
Simplified52.7%
Final simplification67.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.8e+187)
(- x (* y (/ (- t z) z)))
(if (<= z -9e-8)
(+ x (* z (/ y (- z a))))
(if (<= z 4.1e+27) (+ x (/ t (/ (- a z) y))) (- x (/ y (/ z (- t z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.8e+187) {
tmp = x - (y * ((t - z) / z));
} else if (z <= -9e-8) {
tmp = x + (z * (y / (z - a)));
} else if (z <= 4.1e+27) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x - (y / (z / (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 <= (-9.8d+187)) then
tmp = x - (y * ((t - z) / z))
else if (z <= (-9d-8)) then
tmp = x + (z * (y / (z - a)))
else if (z <= 4.1d+27) then
tmp = x + (t / ((a - z) / y))
else
tmp = x - (y / (z / (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 <= -9.8e+187) {
tmp = x - (y * ((t - z) / z));
} else if (z <= -9e-8) {
tmp = x + (z * (y / (z - a)));
} else if (z <= 4.1e+27) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x - (y / (z / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.8e+187: tmp = x - (y * ((t - z) / z)) elif z <= -9e-8: tmp = x + (z * (y / (z - a))) elif z <= 4.1e+27: tmp = x + (t / ((a - z) / y)) else: tmp = x - (y / (z / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.8e+187) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); elseif (z <= -9e-8) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); elseif (z <= 4.1e+27) tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); else tmp = Float64(x - Float64(y / Float64(z / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.8e+187) tmp = x - (y * ((t - z) / z)); elseif (z <= -9e-8) tmp = x + (z * (y / (z - a))); elseif (z <= 4.1e+27) tmp = x + (t / ((a - z) / y)); else tmp = x - (y / (z / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.8e+187], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e-8], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+27], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+187}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-8}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+27}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t - z}}\\
\end{array}
\end{array}
if z < -9.8000000000000006e187Initial program 57.6%
Taylor expanded in a around 0 57.8%
+-commutative57.8%
associate-/l*99.9%
Simplified99.9%
if -9.8000000000000006e187 < z < -8.99999999999999986e-8Initial program 83.8%
+-commutative83.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
clear-num99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 78.0%
associate-*l/89.8%
*-commutative89.8%
Simplified89.8%
if -8.99999999999999986e-8 < z < 4.1000000000000002e27Initial program 93.9%
Taylor expanded in t around inf 85.3%
mul-1-neg85.3%
associate-/l*87.5%
distribute-rgt-neg-in87.5%
distribute-frac-neg87.5%
Simplified87.5%
*-commutative87.5%
div-inv87.5%
div-inv87.5%
add-sqr-sqrt45.5%
sqrt-unprod60.3%
sqr-neg60.3%
sqrt-unprod23.7%
add-sqr-sqrt45.9%
cancel-sign-sub45.9%
distribute-frac-neg45.9%
*-commutative45.9%
clear-num45.9%
un-div-inv45.9%
add-sqr-sqrt22.2%
sqrt-unprod56.8%
sqr-neg56.8%
sqrt-unprod42.0%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
if 4.1000000000000002e27 < z Initial program 70.0%
Taylor expanded in a around 0 66.8%
+-commutative66.8%
associate-/l*92.1%
Simplified92.1%
clear-num92.1%
un-div-inv92.2%
Applied egg-rr92.2%
Final simplification90.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e-15)
(+ y x)
(if (<= z -1.18e-253)
x
(if (<= z 3.6e-275) (* t (/ y a)) (if (<= z 2.7e-118) x (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e-15) {
tmp = y + x;
} else if (z <= -1.18e-253) {
tmp = x;
} else if (z <= 3.6e-275) {
tmp = t * (y / a);
} else if (z <= 2.7e-118) {
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 <= (-4d-15)) then
tmp = y + x
else if (z <= (-1.18d-253)) then
tmp = x
else if (z <= 3.6d-275) then
tmp = t * (y / a)
else if (z <= 2.7d-118) 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 <= -4e-15) {
tmp = y + x;
} else if (z <= -1.18e-253) {
tmp = x;
} else if (z <= 3.6e-275) {
tmp = t * (y / a);
} else if (z <= 2.7e-118) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e-15: tmp = y + x elif z <= -1.18e-253: tmp = x elif z <= 3.6e-275: tmp = t * (y / a) elif z <= 2.7e-118: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e-15) tmp = Float64(y + x); elseif (z <= -1.18e-253) tmp = x; elseif (z <= 3.6e-275) tmp = Float64(t * Float64(y / a)); elseif (z <= 2.7e-118) 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 <= -4e-15) tmp = y + x; elseif (z <= -1.18e-253) tmp = x; elseif (z <= 3.6e-275) tmp = t * (y / a); elseif (z <= 2.7e-118) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e-15], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.18e-253], x, If[LessEqual[z, 3.6e-275], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-118], x, N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-15}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.18 \cdot 10^{-253}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-275}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -4.0000000000000003e-15 or 2.69999999999999994e-118 < z Initial program 76.5%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -4.0000000000000003e-15 < z < -1.1799999999999999e-253 or 3.5999999999999997e-275 < z < 2.69999999999999994e-118Initial program 94.2%
Taylor expanded in x around inf 53.4%
if -1.1799999999999999e-253 < z < 3.5999999999999997e-275Initial program 93.8%
+-commutative93.8%
associate-/l*82.1%
fma-define82.1%
Simplified82.1%
clear-num82.2%
associate-/r/82.1%
Applied egg-rr82.1%
Taylor expanded in t around inf 81.7%
mul-1-neg81.7%
distribute-frac-neg281.7%
*-commutative81.7%
associate-/l*69.6%
sub-neg69.6%
mul-1-neg69.6%
distribute-neg-in69.6%
mul-1-neg69.6%
remove-double-neg69.6%
Simplified69.6%
Taylor expanded in z around 0 76.4%
associate-/l*63.1%
Simplified63.1%
Final simplification65.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.15e-12)
(+ y x)
(if (<= z -1.6e-251)
x
(if (<= z 2.15e-275) (/ (* y t) a) (if (<= z 1.88e-118) x (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.15e-12) {
tmp = y + x;
} else if (z <= -1.6e-251) {
tmp = x;
} else if (z <= 2.15e-275) {
tmp = (y * t) / a;
} else if (z <= 1.88e-118) {
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 <= (-3.15d-12)) then
tmp = y + x
else if (z <= (-1.6d-251)) then
tmp = x
else if (z <= 2.15d-275) then
tmp = (y * t) / a
else if (z <= 1.88d-118) 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 <= -3.15e-12) {
tmp = y + x;
} else if (z <= -1.6e-251) {
tmp = x;
} else if (z <= 2.15e-275) {
tmp = (y * t) / a;
} else if (z <= 1.88e-118) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.15e-12: tmp = y + x elif z <= -1.6e-251: tmp = x elif z <= 2.15e-275: tmp = (y * t) / a elif z <= 1.88e-118: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.15e-12) tmp = Float64(y + x); elseif (z <= -1.6e-251) tmp = x; elseif (z <= 2.15e-275) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.88e-118) 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 <= -3.15e-12) tmp = y + x; elseif (z <= -1.6e-251) tmp = x; elseif (z <= 2.15e-275) tmp = (y * t) / a; elseif (z <= 1.88e-118) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.15e-12], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.6e-251], x, If[LessEqual[z, 2.15e-275], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.88e-118], x, N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{-12}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-251}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-275}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.88 \cdot 10^{-118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -3.1500000000000001e-12 or 1.88000000000000001e-118 < z Initial program 76.5%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -3.1500000000000001e-12 < z < -1.59999999999999991e-251 or 2.14999999999999988e-275 < z < 1.88000000000000001e-118Initial program 94.2%
Taylor expanded in x around inf 53.4%
if -1.59999999999999991e-251 < z < 2.14999999999999988e-275Initial program 93.8%
+-commutative93.8%
associate-/l*82.1%
fma-define82.1%
Simplified82.1%
clear-num82.2%
associate-/r/82.1%
Applied egg-rr82.1%
Taylor expanded in t around inf 81.7%
mul-1-neg81.7%
distribute-frac-neg281.7%
*-commutative81.7%
associate-/l*69.6%
sub-neg69.6%
mul-1-neg69.6%
distribute-neg-in69.6%
mul-1-neg69.6%
remove-double-neg69.6%
Simplified69.6%
Taylor expanded in z around 0 76.4%
Final simplification66.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.92e+84) (not (<= y 22.0))) (* y (/ (- z t) (- z a))) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.92e+84) || !(y <= 22.0)) {
tmp = y * ((z - t) / (z - a));
} 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 ((y <= (-1.92d+84)) .or. (.not. (y <= 22.0d0))) then
tmp = y * ((z - t) / (z - a))
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 ((y <= -1.92e+84) || !(y <= 22.0)) {
tmp = y * ((z - t) / (z - a));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.92e+84) or not (y <= 22.0): tmp = y * ((z - t) / (z - a)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.92e+84) || !(y <= 22.0)) tmp = Float64(y * Float64(Float64(z - t) / Float64(z - a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.92e+84) || ~((y <= 22.0))) tmp = y * ((z - t) / (z - a)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.92e+84], N[Not[LessEqual[y, 22.0]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.92 \cdot 10^{+84} \lor \neg \left(y \leq 22\right):\\
\;\;\;\;y \cdot \frac{z - t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.91999999999999993e84 or 22 < y Initial program 70.7%
+-commutative70.7%
associate-/l*97.3%
fma-define97.3%
Simplified97.3%
clear-num96.7%
associate-/r/97.2%
Applied egg-rr97.2%
Taylor expanded in y around inf 79.5%
div-sub79.5%
Simplified79.5%
if -1.91999999999999993e84 < y < 22Initial program 95.4%
Taylor expanded in x around inf 73.4%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9e+61) (not (<= a 1060.0))) (- x (* y (/ (- z t) a))) (- x (* y (/ (- t z) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9e+61) || !(a <= 1060.0)) {
tmp = x - (y * ((z - t) / a));
} else {
tmp = x - (y * ((t - z) / 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 ((a <= (-9d+61)) .or. (.not. (a <= 1060.0d0))) then
tmp = x - (y * ((z - t) / a))
else
tmp = x - (y * ((t - z) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9e+61) || !(a <= 1060.0)) {
tmp = x - (y * ((z - t) / a));
} else {
tmp = x - (y * ((t - z) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9e+61) or not (a <= 1060.0): tmp = x - (y * ((z - t) / a)) else: tmp = x - (y * ((t - z) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9e+61) || !(a <= 1060.0)) tmp = Float64(x - Float64(y * Float64(Float64(z - t) / a))); else tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9e+61) || ~((a <= 1060.0))) tmp = x - (y * ((z - t) / a)); else tmp = x - (y * ((t - z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9e+61], N[Not[LessEqual[a, 1060.0]], $MachinePrecision]], N[(x - N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{+61} \lor \neg \left(a \leq 1060\right):\\
\;\;\;\;x - y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\end{array}
\end{array}
if a < -9e61 or 1060 < a Initial program 80.7%
Taylor expanded in a around inf 75.3%
mul-1-neg75.3%
unsub-neg75.3%
associate-/l*85.4%
Simplified85.4%
if -9e61 < a < 1060Initial program 85.9%
Taylor expanded in a around 0 73.9%
+-commutative73.9%
associate-/l*85.8%
Simplified85.8%
Final simplification85.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -410000.0) (not (<= z 8.6e-53))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -410000.0) || !(z <= 8.6e-53)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
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 <= (-410000.0d0)) .or. (.not. (z <= 8.6d-53))) then
tmp = y + x
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -410000.0) || !(z <= 8.6e-53)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -410000.0) or not (z <= 8.6e-53): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -410000.0) || !(z <= 8.6e-53)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -410000.0) || ~((z <= 8.6e-53))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -410000.0], N[Not[LessEqual[z, 8.6e-53]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -410000 \lor \neg \left(z \leq 8.6 \cdot 10^{-53}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -4.1e5 or 8.5999999999999999e-53 < z Initial program 73.6%
Taylor expanded in z around inf 75.6%
+-commutative75.6%
Simplified75.6%
if -4.1e5 < z < 8.5999999999999999e-53Initial program 95.0%
Taylor expanded in z around 0 73.9%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -24.5) (not (<= z 3.5e-6))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -24.5) || !(z <= 3.5e-6)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
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 <= (-24.5d0)) .or. (.not. (z <= 3.5d-6))) then
tmp = y + x
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -24.5) || !(z <= 3.5e-6)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -24.5) or not (z <= 3.5e-6): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -24.5) || !(z <= 3.5e-6)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -24.5) || ~((z <= 3.5e-6))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -24.5], N[Not[LessEqual[z, 3.5e-6]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -24.5 \lor \neg \left(z \leq 3.5 \cdot 10^{-6}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -24.5 or 3.49999999999999995e-6 < z Initial program 73.4%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -24.5 < z < 3.49999999999999995e-6Initial program 93.8%
Taylor expanded in z around 0 71.7%
+-commutative71.7%
associate-/l*73.5%
Simplified73.5%
Final simplification75.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3300.0) (not (<= z 1.3e-5))) (+ y x) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3300.0) || !(z <= 1.3e-5)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
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 <= (-3300.0d0)) .or. (.not. (z <= 1.3d-5))) then
tmp = y + x
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3300.0) || !(z <= 1.3e-5)) {
tmp = y + x;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3300.0) or not (z <= 1.3e-5): tmp = y + x else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3300.0) || !(z <= 1.3e-5)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3300.0) || ~((z <= 1.3e-5))) tmp = y + x; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3300.0], N[Not[LessEqual[z, 1.3e-5]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3300 \lor \neg \left(z \leq 1.3 \cdot 10^{-5}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -3300 or 1.29999999999999992e-5 < z Initial program 73.4%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -3300 < z < 1.29999999999999992e-5Initial program 93.8%
Taylor expanded in z around 0 71.7%
+-commutative71.7%
associate-/l*73.5%
Simplified73.5%
clear-num73.5%
un-div-inv73.6%
Applied egg-rr73.6%
Final simplification75.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e-13) (not (<= z 1.55e-118))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e-13) || !(z <= 1.55e-118)) {
tmp = y + x;
} 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 <= (-8d-13)) .or. (.not. (z <= 1.55d-118))) then
tmp = y + x
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 <= -8e-13) || !(z <= 1.55e-118)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e-13) or not (z <= 1.55e-118): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e-13) || !(z <= 1.55e-118)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e-13) || ~((z <= 1.55e-118))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e-13], N[Not[LessEqual[z, 1.55e-118]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-13} \lor \neg \left(z \leq 1.55 \cdot 10^{-118}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.0000000000000002e-13 or 1.5500000000000001e-118 < z Initial program 76.5%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -8.0000000000000002e-13 < z < 1.5500000000000001e-118Initial program 94.2%
Taylor expanded in x around inf 47.5%
Final simplification62.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.1e+163) y (if (<= y 1.48e+156) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.1e+163) {
tmp = y;
} else if (y <= 1.48e+156) {
tmp = x;
} else {
tmp = y;
}
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 (y <= (-3.1d+163)) then
tmp = y
else if (y <= 1.48d+156) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.1e+163) {
tmp = y;
} else if (y <= 1.48e+156) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.1e+163: tmp = y elif y <= 1.48e+156: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.1e+163) tmp = y; elseif (y <= 1.48e+156) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.1e+163) tmp = y; elseif (y <= 1.48e+156) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.1e+163], y, If[LessEqual[y, 1.48e+156], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+163}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1.48 \cdot 10^{+156}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -3.10000000000000029e163 or 1.4799999999999999e156 < y Initial program 59.8%
Taylor expanded in y around inf 87.4%
Taylor expanded in z around inf 35.3%
if -3.10000000000000029e163 < y < 1.4799999999999999e156Initial program 92.9%
Taylor expanded in x around inf 62.2%
Final simplification54.6%
(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 83.6%
Taylor expanded in x around inf 47.5%
Final simplification47.5%
(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 2024067
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))