
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - 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 - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\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)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - 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 - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= y 2.6e-192) (+ (/ (- z t) (/ (- a t) y)) x) (+ x (/ y (/ (- a t) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.6e-192) {
tmp = ((z - t) / ((a - t) / y)) + x;
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
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 <= 2.6d-192) then
tmp = ((z - t) / ((a - t) / y)) + x
else
tmp = x + (y / ((a - t) / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.6e-192) {
tmp = ((z - t) / ((a - t) / y)) + x;
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 2.6e-192: tmp = ((z - t) / ((a - t) / y)) + x else: tmp = x + (y / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.6e-192) tmp = Float64(Float64(Float64(z - t) / Float64(Float64(a - t) / y)) + x); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 2.6e-192) tmp = ((z - t) / ((a - t) / y)) + x; else tmp = x + (y / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.6e-192], N[(N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{-192}:\\
\;\;\;\;\frac{z - t}{\frac{a - t}{y}} + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if y < 2.6000000000000002e-192Initial program 89.0%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.2%
Applied egg-rr99.2%
associate-/r/N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.3%
Applied egg-rr99.3%
if 2.6000000000000002e-192 < y Initial program 87.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.6%
Applied egg-rr98.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.8e+136)
(+ y x)
(if (<= t -1.52e-189)
(- x (/ (* y z) t))
(if (<= t 2.3e+58) (+ x (* z (/ y a))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+136) {
tmp = y + x;
} else if (t <= -1.52e-189) {
tmp = x - ((y * z) / t);
} else if (t <= 2.3e+58) {
tmp = x + (z * (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 <= (-2.8d+136)) then
tmp = y + x
else if (t <= (-1.52d-189)) then
tmp = x - ((y * z) / t)
else if (t <= 2.3d+58) then
tmp = x + (z * (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 <= -2.8e+136) {
tmp = y + x;
} else if (t <= -1.52e-189) {
tmp = x - ((y * z) / t);
} else if (t <= 2.3e+58) {
tmp = x + (z * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+136: tmp = y + x elif t <= -1.52e-189: tmp = x - ((y * z) / t) elif t <= 2.3e+58: tmp = x + (z * (y / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+136) tmp = Float64(y + x); elseif (t <= -1.52e-189) tmp = Float64(x - Float64(Float64(y * z) / t)); elseif (t <= 2.3e+58) tmp = Float64(x + Float64(z * 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 <= -2.8e+136) tmp = y + x; elseif (t <= -1.52e-189) tmp = x - ((y * z) / t); elseif (t <= 2.3e+58) tmp = x + (z * (y / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+136], N[(y + x), $MachinePrecision], If[LessEqual[t, -1.52e-189], N[(x - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+58], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+136}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -1.52 \cdot 10^{-189}:\\
\;\;\;\;x - \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+58}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.8000000000000002e136 or 2.30000000000000002e58 < t Initial program 77.5%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6483.7%
Simplified83.7%
if -2.8000000000000002e136 < t < -1.5199999999999999e-189Initial program 91.0%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
associate-/r/N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in z around inf
Simplified90.7%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.3%
Simplified71.3%
if -1.5199999999999999e-189 < t < 2.30000000000000002e58Initial program 94.9%
Taylor expanded in t around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6475.5%
Simplified75.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6477.1%
Applied egg-rr77.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.8e+192) (+ y x) (if (<= t -1.7e-236) x (if (<= t 7.5e-247) (/ (* y z) a) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+192) {
tmp = y + x;
} else if (t <= -1.7e-236) {
tmp = x;
} else if (t <= 7.5e-247) {
tmp = (y * z) / 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 <= (-2.8d+192)) then
tmp = y + x
else if (t <= (-1.7d-236)) then
tmp = x
else if (t <= 7.5d-247) then
tmp = (y * z) / 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 <= -2.8e+192) {
tmp = y + x;
} else if (t <= -1.7e-236) {
tmp = x;
} else if (t <= 7.5e-247) {
tmp = (y * z) / a;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+192: tmp = y + x elif t <= -1.7e-236: tmp = x elif t <= 7.5e-247: tmp = (y * z) / a else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+192) tmp = Float64(y + x); elseif (t <= -1.7e-236) tmp = x; elseif (t <= 7.5e-247) tmp = Float64(Float64(y * z) / a); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.8e+192) tmp = y + x; elseif (t <= -1.7e-236) tmp = x; elseif (t <= 7.5e-247) tmp = (y * z) / a; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+192], N[(y + x), $MachinePrecision], If[LessEqual[t, -1.7e-236], x, If[LessEqual[t, 7.5e-247], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+192}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-236}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-247}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.79999999999999976e192 or 7.5e-247 < t Initial program 85.0%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6467.0%
Simplified67.0%
if -2.79999999999999976e192 < t < -1.6999999999999999e-236Initial program 91.6%
Taylor expanded in x around inf
Simplified60.3%
if -1.6999999999999999e-236 < t < 7.5e-247Initial program 96.8%
Taylor expanded in t around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6496.3%
Simplified96.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6466.3%
Simplified66.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.8e+192) (+ y x) (if (<= t -3.8e-239) x (if (<= t 3.3e-246) (* y (/ z a)) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+192) {
tmp = y + x;
} else if (t <= -3.8e-239) {
tmp = x;
} else if (t <= 3.3e-246) {
tmp = y * (z / 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 <= (-2.8d+192)) then
tmp = y + x
else if (t <= (-3.8d-239)) then
tmp = x
else if (t <= 3.3d-246) then
tmp = y * (z / 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 <= -2.8e+192) {
tmp = y + x;
} else if (t <= -3.8e-239) {
tmp = x;
} else if (t <= 3.3e-246) {
tmp = y * (z / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+192: tmp = y + x elif t <= -3.8e-239: tmp = x elif t <= 3.3e-246: tmp = y * (z / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+192) tmp = Float64(y + x); elseif (t <= -3.8e-239) tmp = x; elseif (t <= 3.3e-246) tmp = Float64(y * Float64(z / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.8e+192) tmp = y + x; elseif (t <= -3.8e-239) tmp = x; elseif (t <= 3.3e-246) tmp = y * (z / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+192], N[(y + x), $MachinePrecision], If[LessEqual[t, -3.8e-239], x, If[LessEqual[t, 3.3e-246], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+192}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-239}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-246}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.79999999999999976e192 or 3.3000000000000001e-246 < t Initial program 85.0%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6467.0%
Simplified67.0%
if -2.79999999999999976e192 < t < -3.8000000000000002e-239Initial program 91.6%
Taylor expanded in x around inf
Simplified60.3%
if -3.8000000000000002e-239 < t < 3.3000000000000001e-246Initial program 96.8%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6493.7%
Applied egg-rr93.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6466.8%
Simplified66.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6461.8%
Applied egg-rr61.8%
Taylor expanded in a around inf
Simplified61.3%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.75e+111) (+ x (* y (/ t (- t a)))) (if (<= t 7.7e+59) (+ x (/ z (/ (- a t) y))) (+ x (* y (/ (- t z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.75e+111) {
tmp = x + (y * (t / (t - a)));
} else if (t <= 7.7e+59) {
tmp = x + (z / ((a - t) / y));
} else {
tmp = x + (y * ((t - z) / t));
}
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.75d+111)) then
tmp = x + (y * (t / (t - a)))
else if (t <= 7.7d+59) then
tmp = x + (z / ((a - t) / y))
else
tmp = x + (y * ((t - z) / t))
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.75e+111) {
tmp = x + (y * (t / (t - a)));
} else if (t <= 7.7e+59) {
tmp = x + (z / ((a - t) / y));
} else {
tmp = x + (y * ((t - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.75e+111: tmp = x + (y * (t / (t - a))) elif t <= 7.7e+59: tmp = x + (z / ((a - t) / y)) else: tmp = x + (y * ((t - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.75e+111) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); elseif (t <= 7.7e+59) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.75e+111) tmp = x + (y * (t / (t - a))); elseif (t <= 7.7e+59) tmp = x + (z / ((a - t) / y)); else tmp = x + (y * ((t - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.75e+111], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.7e+59], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{+111}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{elif}\;t \leq 7.7 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{t}\\
\end{array}
\end{array}
if t < -2.7499999999999999e111Initial program 67.9%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Simplified99.9%
if -2.7499999999999999e111 < t < 7.69999999999999986e59Initial program 93.9%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.1%
Applied egg-rr97.1%
associate-/r/N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6497.2%
Applied egg-rr97.2%
Taylor expanded in z around inf
Simplified88.6%
if 7.69999999999999986e59 < t Initial program 84.3%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
associate-/r/N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6492.1%
Simplified92.1%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.46e-46) (+ x (/ z (/ (- a t) y))) (if (<= z 3.6e-173) (+ x (* y (/ t (- t a)))) (+ x (* z (/ y (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.46e-46) {
tmp = x + (z / ((a - t) / y));
} else if (z <= 3.6e-173) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (z * (y / (a - t)));
}
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.46d-46)) then
tmp = x + (z / ((a - t) / y))
else if (z <= 3.6d-173) then
tmp = x + (y * (t / (t - a)))
else
tmp = x + (z * (y / (a - t)))
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.46e-46) {
tmp = x + (z / ((a - t) / y));
} else if (z <= 3.6e-173) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.46e-46: tmp = x + (z / ((a - t) / y)) elif z <= 3.6e-173: tmp = x + (y * (t / (t - a))) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.46e-46) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); elseif (z <= 3.6e-173) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.46e-46) tmp = x + (z / ((a - t) / y)); elseif (z <= 3.6e-173) tmp = x + (y * (t / (t - a))); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.46e-46], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-173], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.46 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-173}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if z < -1.46000000000000008e-46Initial program 90.2%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.6%
Applied egg-rr98.6%
associate-/r/N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6498.6%
Applied egg-rr98.6%
Taylor expanded in z around inf
Simplified88.9%
if -1.46000000000000008e-46 < z < 3.59999999999999972e-173Initial program 84.3%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6493.5%
Simplified93.5%
if 3.59999999999999972e-173 < z Initial program 90.9%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.9%
Applied egg-rr98.9%
Taylor expanded in z around inf
Simplified89.4%
Final simplification90.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.8e+192) (+ y x) (if (<= t 3.1e+173) (+ x (/ z (/ (- a t) y))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+192) {
tmp = y + x;
} else if (t <= 3.1e+173) {
tmp = x + (z / ((a - t) / y));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.8d+192)) then
tmp = y + x
else if (t <= 3.1d+173) then
tmp = x + (z / ((a - t) / y))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+192) {
tmp = y + x;
} else if (t <= 3.1e+173) {
tmp = x + (z / ((a - t) / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+192: tmp = y + x elif t <= 3.1e+173: tmp = x + (z / ((a - t) / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+192) tmp = Float64(y + x); elseif (t <= 3.1e+173) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.8e+192) tmp = y + x; elseif (t <= 3.1e+173) tmp = x + (z / ((a - t) / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+192], N[(y + x), $MachinePrecision], If[LessEqual[t, 3.1e+173], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+192}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+173}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.79999999999999976e192 or 3.1e173 < t Initial program 69.1%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6493.2%
Simplified93.2%
if -2.79999999999999976e192 < t < 3.1e173Initial program 93.4%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.1%
Applied egg-rr97.1%
associate-/r/N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6497.2%
Applied egg-rr97.2%
Taylor expanded in z around inf
Simplified85.9%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.8e+192) (+ y x) (if (<= t 1.95e+173) (+ x (* z (/ y (- a t)))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+192) {
tmp = y + x;
} else if (t <= 1.95e+173) {
tmp = x + (z * (y / (a - t)));
} 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.8d+192)) then
tmp = y + x
else if (t <= 1.95d+173) then
tmp = x + (z * (y / (a - t)))
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.8e+192) {
tmp = y + x;
} else if (t <= 1.95e+173) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+192: tmp = y + x elif t <= 1.95e+173: tmp = x + (z * (y / (a - t))) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+192) tmp = Float64(y + x); elseif (t <= 1.95e+173) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.8e+192) tmp = y + x; elseif (t <= 1.95e+173) tmp = x + (z * (y / (a - t))); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+192], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.95e+173], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+192}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+173}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.79999999999999976e192 or 1.9499999999999999e173 < t Initial program 69.1%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6493.2%
Simplified93.2%
if -2.79999999999999976e192 < t < 1.9499999999999999e173Initial program 93.4%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.1%
Applied egg-rr97.1%
Taylor expanded in z around inf
Simplified85.9%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.22e+135) (+ y x) (if (<= t 1.05e+62) (+ x (* y (/ (- z t) a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.22e+135) {
tmp = y + x;
} else if (t <= 1.05e+62) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.22d+135)) then
tmp = y + x
else if (t <= 1.05d+62) then
tmp = x + (y * ((z - t) / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.22e+135) {
tmp = y + x;
} else if (t <= 1.05e+62) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.22e+135: tmp = y + x elif t <= 1.05e+62: tmp = x + (y * ((z - t) / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.22e+135) tmp = Float64(y + x); elseif (t <= 1.05e+62) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.22e+135) tmp = y + x; elseif (t <= 1.05e+62) tmp = x + (y * ((z - t) / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.22e+135], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.05e+62], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+135}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+62}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -1.21999999999999996e135 or 1.05e62 < t Initial program 77.8%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6483.9%
Simplified83.9%
if -1.21999999999999996e135 < t < 1.05e62Initial program 93.5%
Taylor expanded in a around inf
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.9%
Simplified73.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -9e-32) (+ y x) (if (<= t 4.4e+59) (+ x (* z (/ y a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9e-32) {
tmp = y + x;
} else if (t <= 4.4e+59) {
tmp = x + (z * (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 <= (-9d-32)) then
tmp = y + x
else if (t <= 4.4d+59) then
tmp = x + (z * (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 <= -9e-32) {
tmp = y + x;
} else if (t <= 4.4e+59) {
tmp = x + (z * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9e-32: tmp = y + x elif t <= 4.4e+59: tmp = x + (z * (y / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9e-32) tmp = Float64(y + x); elseif (t <= 4.4e+59) tmp = Float64(x + Float64(z * 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 <= -9e-32) tmp = y + x; elseif (t <= 4.4e+59) tmp = x + (z * (y / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9e-32], N[(y + x), $MachinePrecision], If[LessEqual[t, 4.4e+59], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-32}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+59}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -9.00000000000000009e-32 or 4.3999999999999999e59 < t Initial program 78.7%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6477.2%
Simplified77.2%
if -9.00000000000000009e-32 < t < 4.3999999999999999e59Initial program 95.5%
Taylor expanded in t around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6472.7%
Simplified72.7%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6474.5%
Applied egg-rr74.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ z (- a t))))) (if (<= z -4.4e+119) t_1 (if (<= z 2.8e+178) (+ y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (a - t));
double tmp;
if (z <= -4.4e+119) {
tmp = t_1;
} else if (z <= 2.8e+178) {
tmp = y + x;
} 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 = y * (z / (a - t))
if (z <= (-4.4d+119)) then
tmp = t_1
else if (z <= 2.8d+178) then
tmp = y + x
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 = y * (z / (a - t));
double tmp;
if (z <= -4.4e+119) {
tmp = t_1;
} else if (z <= 2.8e+178) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (a - t)) tmp = 0 if z <= -4.4e+119: tmp = t_1 elif z <= 2.8e+178: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(a - t))) tmp = 0.0 if (z <= -4.4e+119) tmp = t_1; elseif (z <= 2.8e+178) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (a - t)); tmp = 0.0; if (z <= -4.4e+119) tmp = t_1; elseif (z <= 2.8e+178) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+119], t$95$1, If[LessEqual[z, 2.8e+178], N[(y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+178}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.4000000000000003e119 or 2.79999999999999993e178 < z Initial program 89.8%
Taylor expanded in z around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.4%
Simplified69.4%
if -4.4000000000000003e119 < z < 2.79999999999999993e178Initial program 88.1%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6466.0%
Simplified66.0%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.9e-193) (+ x (* (- z t) (/ y (- a t)))) (+ x (/ y (/ (- a t) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.9e-193) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
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.9d-193) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = x + (y / ((a - t) / (z - t)))
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.9e-193) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.9e-193: tmp = x + ((z - t) * (y / (a - t))) else: tmp = x + (y / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.9e-193) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.9e-193) tmp = x + ((z - t) * (y / (a - t))); else tmp = x + (y / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.9e-193], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.9 \cdot 10^{-193}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if y < 1.90000000000000002e-193Initial program 89.0%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.2%
Applied egg-rr99.2%
if 1.90000000000000002e-193 < y Initial program 87.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.6%
Applied egg-rr98.6%
Final simplification99.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.8e+192) (+ y x) (if (<= t 3.9e-191) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+192) {
tmp = y + x;
} else if (t <= 3.9e-191) {
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 (t <= (-2.8d+192)) then
tmp = y + x
else if (t <= 3.9d-191) 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 (t <= -2.8e+192) {
tmp = y + x;
} else if (t <= 3.9e-191) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+192: tmp = y + x elif t <= 3.9e-191: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+192) tmp = Float64(y + x); elseif (t <= 3.9e-191) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.8e+192) tmp = y + x; elseif (t <= 3.9e-191) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+192], N[(y + x), $MachinePrecision], If[LessEqual[t, 3.9e-191], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+192}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.79999999999999976e192 or 3.8999999999999999e-191 < t Initial program 83.4%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6470.1%
Simplified70.1%
if -2.79999999999999976e192 < t < 3.8999999999999999e-191Initial program 93.9%
Taylor expanded in x around inf
Simplified52.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -7.6e+129) y (if (<= y 3e+212) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.6e+129) {
tmp = y;
} else if (y <= 3e+212) {
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 <= (-7.6d+129)) then
tmp = y
else if (y <= 3d+212) 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 <= -7.6e+129) {
tmp = y;
} else if (y <= 3e+212) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7.6e+129: tmp = y elif y <= 3e+212: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7.6e+129) tmp = y; elseif (y <= 3e+212) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7.6e+129) tmp = y; elseif (y <= 3e+212) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.6e+129], y, If[LessEqual[y, 3e+212], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+129}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+212}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -7.60000000000000011e129 or 3e212 < y Initial program 66.9%
Taylor expanded in t around inf
+-commutativeN/A
+-lowering-+.f6434.6%
Simplified34.6%
Taylor expanded in y around inf
Simplified30.6%
if -7.60000000000000011e129 < y < 3e212Initial program 93.9%
Taylor expanded in x around inf
Simplified60.5%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - 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 + ((z - t) * (y / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a - t}
\end{array}
Initial program 88.5%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.3%
Applied egg-rr97.3%
Final simplification97.3%
(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 88.5%
Taylor expanded in x around inf
Simplified50.7%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (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 / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2024152
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- a t) (- z t)))))
(+ x (/ (* y (- z t)) (- a t))))