
(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 16 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 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 87.1%
+-commutative87.1%
associate-/l*98.4%
fma-define98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* y (- z t)) z))))
(if (<= z -4.8e+120)
(+ y x)
(if (<= z -1.55e-153)
t_1
(if (<= z 1.35e-191)
(+ x (/ (* y t) a))
(if (<= z 6.2e+200) t_1 (+ y x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (z - t)) / z);
double tmp;
if (z <= -4.8e+120) {
tmp = y + x;
} else if (z <= -1.55e-153) {
tmp = t_1;
} else if (z <= 1.35e-191) {
tmp = x + ((y * t) / a);
} else if (z <= 6.2e+200) {
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 = x + ((y * (z - t)) / z)
if (z <= (-4.8d+120)) then
tmp = y + x
else if (z <= (-1.55d-153)) then
tmp = t_1
else if (z <= 1.35d-191) then
tmp = x + ((y * t) / a)
else if (z <= 6.2d+200) 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 = x + ((y * (z - t)) / z);
double tmp;
if (z <= -4.8e+120) {
tmp = y + x;
} else if (z <= -1.55e-153) {
tmp = t_1;
} else if (z <= 1.35e-191) {
tmp = x + ((y * t) / a);
} else if (z <= 6.2e+200) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * (z - t)) / z) tmp = 0 if z <= -4.8e+120: tmp = y + x elif z <= -1.55e-153: tmp = t_1 elif z <= 1.35e-191: tmp = x + ((y * t) / a) elif z <= 6.2e+200: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * Float64(z - t)) / z)) tmp = 0.0 if (z <= -4.8e+120) tmp = Float64(y + x); elseif (z <= -1.55e-153) tmp = t_1; elseif (z <= 1.35e-191) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 6.2e+200) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * (z - t)) / z); tmp = 0.0; if (z <= -4.8e+120) tmp = y + x; elseif (z <= -1.55e-153) tmp = t_1; elseif (z <= 1.35e-191) tmp = x + ((y * t) / a); elseif (z <= 6.2e+200) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+120], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.55e-153], t$95$1, If[LessEqual[z, 1.35e-191], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+200], t$95$1, N[(y + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+120}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-191}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -4.80000000000000002e120 or 6.19999999999999988e200 < z Initial program 61.1%
Taylor expanded in z around inf 93.6%
+-commutative93.6%
Simplified93.6%
if -4.80000000000000002e120 < z < -1.54999999999999997e-153 or 1.34999999999999999e-191 < z < 6.19999999999999988e200Initial program 94.2%
Taylor expanded in a around 0 77.6%
if -1.54999999999999997e-153 < z < 1.34999999999999999e-191Initial program 99.9%
Taylor expanded in z around 0 89.2%
Final simplification83.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ t z)))))
(if (<= t -2.9e+53)
t_1
(if (<= t 50000000000.0)
(+ y x)
(if (<= t 3.6e+204)
(+ x (* y (/ t a)))
(if (<= t 3.8e+285) t_1 (+ x (/ (* y t) a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (t / z));
double tmp;
if (t <= -2.9e+53) {
tmp = t_1;
} else if (t <= 50000000000.0) {
tmp = y + x;
} else if (t <= 3.6e+204) {
tmp = x + (y * (t / a));
} else if (t <= 3.8e+285) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x - (y * (t / z))
if (t <= (-2.9d+53)) then
tmp = t_1
else if (t <= 50000000000.0d0) then
tmp = y + x
else if (t <= 3.6d+204) then
tmp = x + (y * (t / a))
else if (t <= 3.8d+285) then
tmp = t_1
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 t_1 = x - (y * (t / z));
double tmp;
if (t <= -2.9e+53) {
tmp = t_1;
} else if (t <= 50000000000.0) {
tmp = y + x;
} else if (t <= 3.6e+204) {
tmp = x + (y * (t / a));
} else if (t <= 3.8e+285) {
tmp = t_1;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (t / z)) tmp = 0 if t <= -2.9e+53: tmp = t_1 elif t <= 50000000000.0: tmp = y + x elif t <= 3.6e+204: tmp = x + (y * (t / a)) elif t <= 3.8e+285: tmp = t_1 else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(t / z))) tmp = 0.0 if (t <= -2.9e+53) tmp = t_1; elseif (t <= 50000000000.0) tmp = Float64(y + x); elseif (t <= 3.6e+204) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (t <= 3.8e+285) tmp = t_1; else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (t / z)); tmp = 0.0; if (t <= -2.9e+53) tmp = t_1; elseif (t <= 50000000000.0) tmp = y + x; elseif (t <= 3.6e+204) tmp = x + (y * (t / a)); elseif (t <= 3.8e+285) tmp = t_1; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+53], t$95$1, If[LessEqual[t, 50000000000.0], N[(y + x), $MachinePrecision], If[LessEqual[t, 3.6e+204], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+285], t$95$1, N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 50000000000:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+204}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+285}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if t < -2.9000000000000002e53 or 3.6000000000000002e204 < t < 3.7999999999999999e285Initial program 82.9%
Taylor expanded in a around 0 68.1%
+-commutative68.1%
associate-/l*76.9%
Simplified76.9%
Taylor expanded in z around 0 68.1%
associate-*r/68.1%
neg-mul-168.1%
distribute-rgt-neg-in68.1%
Simplified68.1%
Taylor expanded in t around 0 68.1%
mul-1-neg68.1%
associate-*r/73.4%
sub-neg73.4%
*-commutative73.4%
associate-*l/68.1%
associate-*r/70.7%
Simplified70.7%
if -2.9000000000000002e53 < t < 5e10Initial program 87.4%
Taylor expanded in z around inf 80.2%
+-commutative80.2%
Simplified80.2%
if 5e10 < t < 3.6000000000000002e204Initial program 91.8%
Taylor expanded in z around 0 78.6%
+-commutative78.6%
associate-/l*78.5%
Simplified78.5%
clear-num78.5%
un-div-inv78.6%
Applied egg-rr78.6%
associate-/r/80.5%
Simplified80.5%
if 3.7999999999999999e285 < t Initial program 100.0%
Taylor expanded in z around 0 100.0%
Final simplification77.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.5e+53)
(- x (/ y (/ z t)))
(if (<= t 3e+20)
(+ y x)
(if (<= t 7.8e+204)
(+ x (* y (/ t a)))
(if (<= t 1.4e+284) (- x (* y (/ t z))) (+ x (/ (* y t) a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+53) {
tmp = x - (y / (z / t));
} else if (t <= 3e+20) {
tmp = y + x;
} else if (t <= 7.8e+204) {
tmp = x + (y * (t / a));
} else if (t <= 1.4e+284) {
tmp = x - (y * (t / z));
} 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 (t <= (-2.5d+53)) then
tmp = x - (y / (z / t))
else if (t <= 3d+20) then
tmp = y + x
else if (t <= 7.8d+204) then
tmp = x + (y * (t / a))
else if (t <= 1.4d+284) then
tmp = x - (y * (t / z))
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 (t <= -2.5e+53) {
tmp = x - (y / (z / t));
} else if (t <= 3e+20) {
tmp = y + x;
} else if (t <= 7.8e+204) {
tmp = x + (y * (t / a));
} else if (t <= 1.4e+284) {
tmp = x - (y * (t / z));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.5e+53: tmp = x - (y / (z / t)) elif t <= 3e+20: tmp = y + x elif t <= 7.8e+204: tmp = x + (y * (t / a)) elif t <= 1.4e+284: tmp = x - (y * (t / z)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.5e+53) tmp = Float64(x - Float64(y / Float64(z / t))); elseif (t <= 3e+20) tmp = Float64(y + x); elseif (t <= 7.8e+204) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (t <= 1.4e+284) tmp = Float64(x - Float64(y * Float64(t / z))); 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 (t <= -2.5e+53) tmp = x - (y / (z / t)); elseif (t <= 3e+20) tmp = y + x; elseif (t <= 7.8e+204) tmp = x + (y * (t / a)); elseif (t <= 1.4e+284) tmp = x - (y * (t / z)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.5e+53], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+20], N[(y + x), $MachinePrecision], If[LessEqual[t, 7.8e+204], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+284], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+53}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+20}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+204}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+284}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if t < -2.5000000000000002e53Initial program 82.2%
Taylor expanded in a around 0 67.5%
+-commutative67.5%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in z around 0 69.2%
associate-*r/69.2%
neg-mul-169.2%
distribute-rgt-neg-in69.2%
Simplified69.2%
Taylor expanded in t around 0 69.2%
mul-1-neg69.2%
associate-*r/72.8%
sub-neg72.8%
*-commutative72.8%
associate-*l/69.2%
associate-*r/72.8%
Simplified72.8%
clear-num72.7%
un-div-inv72.8%
Applied egg-rr72.8%
if -2.5000000000000002e53 < t < 3e20Initial program 87.4%
Taylor expanded in z around inf 80.2%
+-commutative80.2%
Simplified80.2%
if 3e20 < t < 7.80000000000000033e204Initial program 91.8%
Taylor expanded in z around 0 78.6%
+-commutative78.6%
associate-/l*78.5%
Simplified78.5%
clear-num78.5%
un-div-inv78.6%
Applied egg-rr78.6%
associate-/r/80.5%
Simplified80.5%
if 7.80000000000000033e204 < t < 1.39999999999999998e284Initial program 84.7%
Taylor expanded in a around 0 69.8%
+-commutative69.8%
associate-/l*69.8%
Simplified69.8%
Taylor expanded in z around 0 64.9%
associate-*r/64.9%
neg-mul-164.9%
distribute-rgt-neg-in64.9%
Simplified64.9%
Taylor expanded in t around 0 64.9%
mul-1-neg64.9%
associate-*r/74.9%
sub-neg74.9%
*-commutative74.9%
associate-*l/64.9%
associate-*r/65.0%
Simplified65.0%
if 1.39999999999999998e284 < t Initial program 100.0%
Taylor expanded in z around 0 100.0%
Final simplification77.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.4e+52)
(- x (/ y (/ z t)))
(if (<= t 3.6e+19)
(+ y x)
(if (<= t 1.52e+206)
(+ x (* y (/ t a)))
(if (<= t 1.62e+263) (- x (/ (* y t) z)) (+ x (* t (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.4e+52) {
tmp = x - (y / (z / t));
} else if (t <= 3.6e+19) {
tmp = y + x;
} else if (t <= 1.52e+206) {
tmp = x + (y * (t / a));
} else if (t <= 1.62e+263) {
tmp = x - ((y * t) / z);
} 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 (t <= (-4.4d+52)) then
tmp = x - (y / (z / t))
else if (t <= 3.6d+19) then
tmp = y + x
else if (t <= 1.52d+206) then
tmp = x + (y * (t / a))
else if (t <= 1.62d+263) then
tmp = x - ((y * t) / z)
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 (t <= -4.4e+52) {
tmp = x - (y / (z / t));
} else if (t <= 3.6e+19) {
tmp = y + x;
} else if (t <= 1.52e+206) {
tmp = x + (y * (t / a));
} else if (t <= 1.62e+263) {
tmp = x - ((y * t) / z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.4e+52: tmp = x - (y / (z / t)) elif t <= 3.6e+19: tmp = y + x elif t <= 1.52e+206: tmp = x + (y * (t / a)) elif t <= 1.62e+263: tmp = x - ((y * t) / z) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.4e+52) tmp = Float64(x - Float64(y / Float64(z / t))); elseif (t <= 3.6e+19) tmp = Float64(y + x); elseif (t <= 1.52e+206) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (t <= 1.62e+263) tmp = Float64(x - Float64(Float64(y * t) / z)); 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 (t <= -4.4e+52) tmp = x - (y / (z / t)); elseif (t <= 3.6e+19) tmp = y + x; elseif (t <= 1.52e+206) tmp = x + (y * (t / a)); elseif (t <= 1.62e+263) tmp = x - ((y * t) / z); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.4e+52], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+19], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.52e+206], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.62e+263], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+52}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+19}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.52 \cdot 10^{+206}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{+263}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -4.4e52Initial program 82.2%
Taylor expanded in a around 0 67.5%
+-commutative67.5%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in z around 0 69.2%
associate-*r/69.2%
neg-mul-169.2%
distribute-rgt-neg-in69.2%
Simplified69.2%
Taylor expanded in t around 0 69.2%
mul-1-neg69.2%
associate-*r/72.8%
sub-neg72.8%
*-commutative72.8%
associate-*l/69.2%
associate-*r/72.8%
Simplified72.8%
clear-num72.7%
un-div-inv72.8%
Applied egg-rr72.8%
if -4.4e52 < t < 3.6e19Initial program 87.4%
Taylor expanded in z around inf 80.2%
+-commutative80.2%
Simplified80.2%
if 3.6e19 < t < 1.52e206Initial program 91.8%
Taylor expanded in z around 0 78.6%
+-commutative78.6%
associate-/l*78.5%
Simplified78.5%
clear-num78.5%
un-div-inv78.6%
Applied egg-rr78.6%
associate-/r/80.5%
Simplified80.5%
if 1.52e206 < t < 1.61999999999999993e263Initial program 93.7%
Taylor expanded in a around 0 76.3%
+-commutative76.3%
associate-/l*70.4%
Simplified70.4%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
neg-mul-170.6%
distribute-rgt-neg-in70.6%
Simplified70.6%
Taylor expanded in t around 0 70.6%
mul-1-neg70.6%
associate-*r/76.5%
sub-neg76.5%
*-commutative76.5%
associate-*l/70.6%
associate-*r/64.7%
Simplified64.7%
associate-*r/70.6%
Applied egg-rr70.6%
if 1.61999999999999993e263 < t Initial program 72.9%
Taylor expanded in z around 0 58.6%
+-commutative58.6%
associate-/l*72.3%
Simplified72.3%
Final simplification77.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -3.6e-40)
t_1
(if (<= z -1.8e-151)
(+ x (/ (* y (- z t)) z))
(if (<= z 2.5e-168) (+ x (/ (* y t) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.6e-40) {
tmp = t_1;
} else if (z <= -1.8e-151) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 2.5e-168) {
tmp = x + ((y * t) / 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) :: tmp
t_1 = x + (y * (z / (z - a)))
if (z <= (-3.6d-40)) then
tmp = t_1
else if (z <= (-1.8d-151)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 2.5d-168) then
tmp = x + ((y * t) / 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 = x + (y * (z / (z - a)));
double tmp;
if (z <= -3.6e-40) {
tmp = t_1;
} else if (z <= -1.8e-151) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 2.5e-168) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -3.6e-40: tmp = t_1 elif z <= -1.8e-151: tmp = x + ((y * (z - t)) / z) elif z <= 2.5e-168: tmp = x + ((y * t) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -3.6e-40) tmp = t_1; elseif (z <= -1.8e-151) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 2.5e-168) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -3.6e-40) tmp = t_1; elseif (z <= -1.8e-151) tmp = x + ((y * (z - t)) / z); elseif (z <= 2.5e-168) tmp = x + ((y * t) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e-40], t$95$1, If[LessEqual[z, -1.8e-151], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-168], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-151}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-168}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.6e-40 or 2.50000000000000001e-168 < z Initial program 81.7%
Taylor expanded in t around 0 70.3%
+-commutative70.3%
associate-/l*83.6%
Simplified83.6%
if -3.6e-40 < z < -1.80000000000000016e-151Initial program 96.7%
Taylor expanded in a around 0 90.1%
if -1.80000000000000016e-151 < z < 2.50000000000000001e-168Initial program 99.9%
Taylor expanded in z around 0 86.7%
Final simplification85.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.5e-40)
(+ x (* y (/ z (- z a))))
(if (<= z -2.25e-153)
(+ x (/ (* y (- z t)) z))
(if (<= z 1.3e-191) (+ x (/ (* y t) a)) (- x (* y (/ (- t z) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e-40) {
tmp = x + (y * (z / (z - a)));
} else if (z <= -2.25e-153) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 1.3e-191) {
tmp = x + ((y * 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 (z <= (-2.5d-40)) then
tmp = x + (y * (z / (z - a)))
else if (z <= (-2.25d-153)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 1.3d-191) then
tmp = x + ((y * 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 (z <= -2.5e-40) {
tmp = x + (y * (z / (z - a)));
} else if (z <= -2.25e-153) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 1.3e-191) {
tmp = x + ((y * t) / a);
} else {
tmp = x - (y * ((t - z) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e-40: tmp = x + (y * (z / (z - a))) elif z <= -2.25e-153: tmp = x + ((y * (z - t)) / z) elif z <= 1.3e-191: tmp = x + ((y * t) / a) else: tmp = x - (y * ((t - z) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e-40) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= -2.25e-153) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 1.3e-191) tmp = Float64(x + Float64(Float64(y * 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 (z <= -2.5e-40) tmp = x + (y * (z / (z - a))); elseif (z <= -2.25e-153) tmp = x + ((y * (z - t)) / z); elseif (z <= 1.3e-191) tmp = x + ((y * t) / a); else tmp = x - (y * ((t - z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e-40], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.25e-153], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-191], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-40}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-153}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-191}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\end{array}
\end{array}
if z < -2.49999999999999982e-40Initial program 78.1%
Taylor expanded in t around 0 65.8%
+-commutative65.8%
associate-/l*84.7%
Simplified84.7%
if -2.49999999999999982e-40 < z < -2.25e-153Initial program 96.7%
Taylor expanded in a around 0 90.1%
if -2.25e-153 < z < 1.29999999999999993e-191Initial program 99.9%
Taylor expanded in z around 0 89.2%
if 1.29999999999999993e-191 < z Initial program 84.6%
Taylor expanded in a around 0 73.6%
+-commutative73.6%
associate-/l*86.4%
Simplified86.4%
Final simplification86.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.1e+28) (not (<= t 2.8e+75))) (+ x (/ y (/ (- a z) t))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e+28) || !(t <= 2.8e+75)) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x + (y * (z / (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 ((t <= (-2.1d+28)) .or. (.not. (t <= 2.8d+75))) then
tmp = x + (y / ((a - z) / t))
else
tmp = x + (y * (z / (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 ((t <= -2.1e+28) || !(t <= 2.8e+75)) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.1e+28) or not (t <= 2.8e+75): tmp = x + (y / ((a - z) / t)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.1e+28) || !(t <= 2.8e+75)) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.1e+28) || ~((t <= 2.8e+75))) tmp = x + (y / ((a - z) / t)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.1e+28], N[Not[LessEqual[t, 2.8e+75]], $MachinePrecision]], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+28} \lor \neg \left(t \leq 2.8 \cdot 10^{+75}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -2.09999999999999989e28 or 2.80000000000000012e75 < t Initial program 85.3%
associate-/l*97.4%
*-commutative97.4%
Applied egg-rr97.4%
Taylor expanded in t around inf 90.0%
neg-mul-190.0%
distribute-neg-frac90.0%
Simplified90.0%
Taylor expanded in x around 0 85.2%
mul-1-neg85.2%
associate-/l*90.8%
distribute-lft-neg-in90.8%
cancel-sign-sub-inv90.8%
associate-/l*85.2%
*-rgt-identity85.2%
*-commutative85.2%
times-frac90.8%
/-rgt-identity90.8%
associate-/r/90.0%
Simplified90.0%
if -2.09999999999999989e28 < t < 2.80000000000000012e75Initial program 88.5%
Taylor expanded in t around 0 80.8%
+-commutative80.8%
associate-/l*92.2%
Simplified92.2%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.06e+22) (+ x (/ y (/ (- a z) t))) (if (<= t 2.8e+75) (+ x (* y (/ z (- z a)))) (+ x (* t (/ y (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.06e+22) {
tmp = x + (y / ((a - z) / t));
} else if (t <= 2.8e+75) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (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 (t <= (-1.06d+22)) then
tmp = x + (y / ((a - z) / t))
else if (t <= 2.8d+75) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (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 (t <= -1.06e+22) {
tmp = x + (y / ((a - z) / t));
} else if (t <= 2.8e+75) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.06e+22: tmp = x + (y / ((a - z) / t)) elif t <= 2.8e+75: tmp = x + (y * (z / (z - a))) else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.06e+22) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); elseif (t <= 2.8e+75) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.06e+22) tmp = x + (y / ((a - z) / t)); elseif (t <= 2.8e+75) tmp = x + (y * (z / (z - a))); else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.06e+22], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+75], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{+22}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+75}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if t < -1.06e22Initial program 82.5%
associate-/l*98.3%
*-commutative98.3%
Applied egg-rr98.3%
Taylor expanded in t around inf 90.2%
neg-mul-190.2%
distribute-neg-frac90.2%
Simplified90.2%
Taylor expanded in x around 0 83.9%
mul-1-neg83.9%
associate-/l*90.2%
distribute-lft-neg-in90.2%
cancel-sign-sub-inv90.2%
associate-/l*83.9%
*-rgt-identity83.9%
*-commutative83.9%
times-frac90.2%
/-rgt-identity90.2%
associate-/r/90.2%
Simplified90.2%
if -1.06e22 < t < 2.80000000000000012e75Initial program 88.5%
Taylor expanded in t around 0 80.8%
+-commutative80.8%
associate-/l*92.2%
Simplified92.2%
if 2.80000000000000012e75 < t Initial program 88.2%
Taylor expanded in t around inf 86.6%
mul-1-neg86.6%
associate-/l*91.4%
distribute-rgt-neg-in91.4%
distribute-neg-frac291.4%
sub-neg91.4%
distribute-neg-in91.4%
remove-double-neg91.4%
Simplified91.4%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7e+23) (not (<= z 3.2e-168))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e+23) || !(z <= 3.2e-168)) {
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 <= (-7d+23)) .or. (.not. (z <= 3.2d-168))) 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 <= -7e+23) || !(z <= 3.2e-168)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7e+23) or not (z <= 3.2e-168): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7e+23) || !(z <= 3.2e-168)) 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 <= -7e+23) || ~((z <= 3.2e-168))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7e+23], N[Not[LessEqual[z, 3.2e-168]], $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 -7 \cdot 10^{+23} \lor \neg \left(z \leq 3.2 \cdot 10^{-168}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -7.0000000000000004e23 or 3.20000000000000006e-168 < z Initial program 80.1%
Taylor expanded in z around inf 78.3%
+-commutative78.3%
Simplified78.3%
if -7.0000000000000004e23 < z < 3.20000000000000006e-168Initial program 98.9%
Taylor expanded in z around 0 74.5%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.7e-122) x (if (<= x 2.6e-161) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.7e-122) {
tmp = x;
} else if (x <= 2.6e-161) {
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 (x <= (-1.7d-122)) then
tmp = x
else if (x <= 2.6d-161) 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 (x <= -1.7e-122) {
tmp = x;
} else if (x <= 2.6e-161) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.7e-122: tmp = x elif x <= 2.6e-161: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.7e-122) tmp = x; elseif (x <= 2.6e-161) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.7e-122) tmp = x; elseif (x <= 2.6e-161) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.7e-122], x, If[LessEqual[x, 2.6e-161], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-122}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-161}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.6999999999999999e-122 or 2.59999999999999995e-161 < x Initial program 87.5%
Taylor expanded in x around inf 61.9%
if -1.6999999999999999e-122 < x < 2.59999999999999995e-161Initial program 86.0%
Taylor expanded in x around 0 74.5%
Taylor expanded in z around inf 43.8%
Final simplification57.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.6e+221) (* y (/ t (- z))) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.6e+221) {
tmp = y * (t / -z);
} 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 (t <= (-2.6d+221)) then
tmp = y * (t / -z)
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 (t <= -2.6e+221) {
tmp = y * (t / -z);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.6e+221: tmp = y * (t / -z) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.6e+221) tmp = Float64(y * Float64(t / Float64(-z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.6e+221) tmp = y * (t / -z); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.6e+221], N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+221}:\\
\;\;\;\;y \cdot \frac{t}{-z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.60000000000000004e221Initial program 84.3%
Taylor expanded in a around 0 72.0%
+-commutative72.0%
associate-/l*76.3%
Simplified76.3%
Taylor expanded in z around 0 72.0%
associate-*r/72.0%
neg-mul-172.0%
distribute-rgt-neg-in72.0%
Simplified72.0%
Taylor expanded in t around 0 72.0%
mul-1-neg72.0%
associate-*r/72.4%
sub-neg72.4%
*-commutative72.4%
associate-*l/72.0%
associate-*r/72.5%
Simplified72.5%
Taylor expanded in x around 0 62.6%
associate-*r/62.6%
*-commutative62.6%
neg-mul-162.6%
distribute-rgt-neg-in62.6%
associate-/l*60.5%
Simplified60.5%
if -2.60000000000000004e221 < t Initial program 87.4%
Taylor expanded in z around inf 70.3%
+-commutative70.3%
Simplified70.3%
Final simplification69.4%
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 87.1%
associate-/l*98.4%
*-commutative98.4%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -4e+223) (* t (/ y a)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4e+223) {
tmp = 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 (t <= (-4d+223)) then
tmp = 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 (t <= -4e+223) {
tmp = t * (y / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4e+223: tmp = t * (y / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4e+223) tmp = 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 (t <= -4e+223) tmp = t * (y / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4e+223], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+223}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -4.00000000000000019e223Initial program 83.6%
Taylor expanded in x around 0 69.7%
Taylor expanded in z around 0 41.0%
associate-/l*47.2%
Simplified47.2%
if -4.00000000000000019e223 < t Initial program 87.4%
Taylor expanded in z around inf 70.0%
+-commutative70.0%
Simplified70.0%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.42e+163) x (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.42e+163) {
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 (a <= (-1.42d+163)) 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 (a <= -1.42e+163) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.42e+163: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.42e+163) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.42e+163) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.42e+163], x, N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+163}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -1.4199999999999999e163Initial program 89.6%
Taylor expanded in x around inf 71.1%
if -1.4199999999999999e163 < a Initial program 86.8%
Taylor expanded in z around inf 67.6%
+-commutative67.6%
Simplified67.6%
Final simplification67.9%
(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 87.1%
Taylor expanded in x around inf 49.5%
Final simplification49.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 2024095
(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))))