
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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 - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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 - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y z) t) (- a z))))
(if (<= t_1 (- INFINITY))
(+ x (* (- y z) (/ t (- a z))))
(if (<= t_1 2e+250) (+ t_1 x) (+ x (/ (- y z) (/ (- a z) t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) * t) / (a - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (t_1 <= 2e+250) {
tmp = t_1 + x;
} else {
tmp = x + ((y - z) / ((a - z) / t));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) * t) / (a - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (t_1 <= 2e+250) {
tmp = t_1 + x;
} else {
tmp = x + ((y - z) / ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - z) * t) / (a - z) tmp = 0 if t_1 <= -math.inf: tmp = x + ((y - z) * (t / (a - z))) elif t_1 <= 2e+250: tmp = t_1 + x else: tmp = x + ((y - z) / ((a - z) / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (t_1 <= 2e+250) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - z) * t) / (a - z); tmp = 0.0; if (t_1 <= -Inf) tmp = x + ((y - z) * (t / (a - z))); elseif (t_1 <= 2e+250) tmp = t_1 + x; else tmp = x + ((y - z) / ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+250], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+250}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0Initial program 29.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 1.9999999999999998e250Initial program 99.4%
if 1.9999999999999998e250 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 42.2%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (* (- y z) (/ t (- a z))))) (t_2 (/ (* (- y z) t) (- a z)))) (if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 2e+250) (+ t_2 x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double t_2 = ((y - z) * t) / (a - z);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 2e+250) {
tmp = t_2 + x;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double t_2 = ((y - z) * t) / (a - z);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= 2e+250) {
tmp = t_2 + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (t / (a - z))) t_2 = ((y - z) * t) / (a - z) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= 2e+250: tmp = t_2 + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 2e+250) tmp = Float64(t_2 + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (t / (a - z))); t_2 = ((y - z) * t) / (a - z); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= 2e+250) tmp = t_2 + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e+250], N[(t$95$2 + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\
t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+250}:\\
\;\;\;\;t\_2 + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0 or 1.9999999999999998e250 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 36.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 1.9999999999999998e250Initial program 99.4%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.8e+37)
(+ t x)
(if (<= z 7e-77)
(+ x (* (- y z) (/ t a)))
(if (<= z 54000000.0) (- x (* t (/ y z))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.8e+37) {
tmp = t + x;
} else if (z <= 7e-77) {
tmp = x + ((y - z) * (t / a));
} else if (z <= 54000000.0) {
tmp = x - (t * (y / z));
} else {
tmp = t + 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 <= (-4.8d+37)) then
tmp = t + x
else if (z <= 7d-77) then
tmp = x + ((y - z) * (t / a))
else if (z <= 54000000.0d0) then
tmp = x - (t * (y / z))
else
tmp = t + 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 <= -4.8e+37) {
tmp = t + x;
} else if (z <= 7e-77) {
tmp = x + ((y - z) * (t / a));
} else if (z <= 54000000.0) {
tmp = x - (t * (y / z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.8e+37: tmp = t + x elif z <= 7e-77: tmp = x + ((y - z) * (t / a)) elif z <= 54000000.0: tmp = x - (t * (y / z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.8e+37) tmp = Float64(t + x); elseif (z <= 7e-77) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a))); elseif (z <= 54000000.0) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.8e+37) tmp = t + x; elseif (z <= 7e-77) tmp = x + ((y - z) * (t / a)); elseif (z <= 54000000.0) tmp = x - (t * (y / z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.8e+37], N[(t + x), $MachinePrecision], If[LessEqual[z, 7e-77], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 54000000.0], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+37}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-77}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 54000000:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -4.8e37 or 5.4e7 < z Initial program 76.1%
Taylor expanded in z around inf
Simplified80.8%
if -4.8e37 < z < 7.00000000000000026e-77Initial program 95.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6495.5%
Applied egg-rr95.5%
Taylor expanded in a around inf
/-lowering-/.f6478.8%
Simplified78.8%
if 7.00000000000000026e-77 < z < 5.4e7Initial program 95.5%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6491.0%
Simplified91.0%
Taylor expanded in y around inf
/-lowering-/.f6486.8%
Simplified86.8%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.5e+64)
(+ t x)
(if (<= z 3.2e-98)
(+ x (/ (* y t) a))
(if (<= z 11500000.0) (- x (* y (/ t z))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+64) {
tmp = t + x;
} else if (z <= 3.2e-98) {
tmp = x + ((y * t) / a);
} else if (z <= 11500000.0) {
tmp = x - (y * (t / z));
} else {
tmp = t + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.5d+64)) then
tmp = t + x
else if (z <= 3.2d-98) then
tmp = x + ((y * t) / a)
else if (z <= 11500000.0d0) then
tmp = x - (y * (t / z))
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+64) {
tmp = t + x;
} else if (z <= 3.2e-98) {
tmp = x + ((y * t) / a);
} else if (z <= 11500000.0) {
tmp = x - (y * (t / z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e+64: tmp = t + x elif z <= 3.2e-98: tmp = x + ((y * t) / a) elif z <= 11500000.0: tmp = x - (y * (t / z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e+64) tmp = Float64(t + x); elseif (z <= 3.2e-98) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 11500000.0) tmp = Float64(x - Float64(y * Float64(t / z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e+64) tmp = t + x; elseif (z <= 3.2e-98) tmp = x + ((y * t) / a); elseif (z <= 11500000.0) tmp = x - (y * (t / z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e+64], N[(t + x), $MachinePrecision], If[LessEqual[z, 3.2e-98], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 11500000.0], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+64}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-98}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 11500000:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -8.4999999999999998e64 or 1.15e7 < z Initial program 74.1%
Taylor expanded in z around inf
Simplified80.8%
if -8.4999999999999998e64 < z < 3.2000000000000001e-98Initial program 96.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6478.4%
Simplified78.4%
if 3.2000000000000001e-98 < z < 1.15e7Initial program 93.3%
Taylor expanded in y around inf
Simplified83.4%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6476.4%
Simplified76.4%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.9e+66)
(+ t x)
(if (<= z 2e-91)
(+ x (/ (* y t) a))
(if (<= z 80000.0) (- x (* t (/ y z))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+66) {
tmp = t + x;
} else if (z <= 2e-91) {
tmp = x + ((y * t) / a);
} else if (z <= 80000.0) {
tmp = x - (t * (y / z));
} else {
tmp = t + 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+66)) then
tmp = t + x
else if (z <= 2d-91) then
tmp = x + ((y * t) / a)
else if (z <= 80000.0d0) then
tmp = x - (t * (y / z))
else
tmp = t + 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+66) {
tmp = t + x;
} else if (z <= 2e-91) {
tmp = x + ((y * t) / a);
} else if (z <= 80000.0) {
tmp = x - (t * (y / z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e+66: tmp = t + x elif z <= 2e-91: tmp = x + ((y * t) / a) elif z <= 80000.0: tmp = x - (t * (y / z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+66) tmp = Float64(t + x); elseif (z <= 2e-91) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 80000.0) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.9e+66) tmp = t + x; elseif (z <= 2e-91) tmp = x + ((y * t) / a); elseif (z <= 80000.0) tmp = x - (t * (y / z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+66], N[(t + x), $MachinePrecision], If[LessEqual[z, 2e-91], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 80000.0], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+66}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-91}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 80000:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -1.9000000000000001e66 or 8e4 < z Initial program 74.1%
Taylor expanded in z around inf
Simplified80.8%
if -1.9000000000000001e66 < z < 2.00000000000000004e-91Initial program 96.6%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6477.3%
Simplified77.3%
if 2.00000000000000004e-91 < z < 8e4Initial program 92.5%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6481.4%
Simplified81.4%
Taylor expanded in y around inf
/-lowering-/.f6477.6%
Simplified77.6%
Final simplification78.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.6e+65)
(+ t x)
(if (<= z 4.6e-51)
(+ x (/ (* y t) a))
(if (<= z 16000.0) (* t (- 1.0 (/ y z))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e+65) {
tmp = t + x;
} else if (z <= 4.6e-51) {
tmp = x + ((y * t) / a);
} else if (z <= 16000.0) {
tmp = t * (1.0 - (y / z));
} else {
tmp = t + 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 <= (-6.6d+65)) then
tmp = t + x
else if (z <= 4.6d-51) then
tmp = x + ((y * t) / a)
else if (z <= 16000.0d0) then
tmp = t * (1.0d0 - (y / z))
else
tmp = t + 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 <= -6.6e+65) {
tmp = t + x;
} else if (z <= 4.6e-51) {
tmp = x + ((y * t) / a);
} else if (z <= 16000.0) {
tmp = t * (1.0 - (y / z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.6e+65: tmp = t + x elif z <= 4.6e-51: tmp = x + ((y * t) / a) elif z <= 16000.0: tmp = t * (1.0 - (y / z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.6e+65) tmp = Float64(t + x); elseif (z <= 4.6e-51) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 16000.0) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.6e+65) tmp = t + x; elseif (z <= 4.6e-51) tmp = x + ((y * t) / a); elseif (z <= 16000.0) tmp = t * (1.0 - (y / z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e+65], N[(t + x), $MachinePrecision], If[LessEqual[z, 4.6e-51], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 16000.0], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+65}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-51}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 16000:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -6.60000000000000046e65 or 16000 < z Initial program 74.1%
Taylor expanded in z around inf
Simplified80.8%
if -6.60000000000000046e65 < z < 4.60000000000000004e-51Initial program 96.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.6%
Simplified76.6%
if 4.60000000000000004e-51 < z < 16000Initial program 94.2%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6488.4%
Simplified88.4%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6464.3%
Simplified64.3%
Final simplification77.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+36)
(+ t x)
(if (<= z 9e-51)
(+ x (* y (/ t a)))
(if (<= z 235000.0) (* t (- 1.0 (/ y z))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+36) {
tmp = t + x;
} else if (z <= 9e-51) {
tmp = x + (y * (t / a));
} else if (z <= 235000.0) {
tmp = t * (1.0 - (y / z));
} else {
tmp = t + 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.2d+36)) then
tmp = t + x
else if (z <= 9d-51) then
tmp = x + (y * (t / a))
else if (z <= 235000.0d0) then
tmp = t * (1.0d0 - (y / z))
else
tmp = t + 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.2e+36) {
tmp = t + x;
} else if (z <= 9e-51) {
tmp = x + (y * (t / a));
} else if (z <= 235000.0) {
tmp = t * (1.0 - (y / z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+36: tmp = t + x elif z <= 9e-51: tmp = x + (y * (t / a)) elif z <= 235000.0: tmp = t * (1.0 - (y / z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+36) tmp = Float64(t + x); elseif (z <= 9e-51) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 235000.0) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+36) tmp = t + x; elseif (z <= 9e-51) tmp = x + (y * (t / a)); elseif (z <= 235000.0) tmp = t * (1.0 - (y / z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+36], N[(t + x), $MachinePrecision], If[LessEqual[z, 9e-51], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 235000.0], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+36}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-51}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 235000:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -3.1999999999999999e36 or 235000 < z Initial program 76.1%
Taylor expanded in z around inf
Simplified80.8%
if -3.1999999999999999e36 < z < 8.99999999999999948e-51Initial program 95.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6475.4%
Simplified75.4%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6475.3%
Applied egg-rr75.3%
if 8.99999999999999948e-51 < z < 235000Initial program 94.2%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6488.4%
Simplified88.4%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6464.3%
Simplified64.3%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- x (* t (+ -1.0 (/ y z)))))) (if (<= z -1.9e+66) t_1 (if (<= z 7.4e-25) (+ x (/ (* y t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t * (-1.0 + (y / z)));
double tmp;
if (z <= -1.9e+66) {
tmp = t_1;
} else if (z <= 7.4e-25) {
tmp = x + ((y * t) / (a - z));
} 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 - (t * ((-1.0d0) + (y / z)))
if (z <= (-1.9d+66)) then
tmp = t_1
else if (z <= 7.4d-25) then
tmp = x + ((y * t) / (a - z))
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 - (t * (-1.0 + (y / z)));
double tmp;
if (z <= -1.9e+66) {
tmp = t_1;
} else if (z <= 7.4e-25) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t * (-1.0 + (y / z))) tmp = 0 if z <= -1.9e+66: tmp = t_1 elif z <= 7.4e-25: tmp = x + ((y * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t * Float64(-1.0 + Float64(y / z)))) tmp = 0.0 if (z <= -1.9e+66) tmp = t_1; elseif (z <= 7.4e-25) tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t * (-1.0 + (y / z))); tmp = 0.0; if (z <= -1.9e+66) tmp = t_1; elseif (z <= 7.4e-25) tmp = x + ((y * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+66], t$95$1, If[LessEqual[z, 7.4e-25], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-25}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9000000000000001e66 or 7.40000000000000017e-25 < z Initial program 74.6%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6486.0%
Simplified86.0%
if -1.9000000000000001e66 < z < 7.40000000000000017e-25Initial program 96.4%
Taylor expanded in y around inf
Simplified86.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.2e+105) (+ t x) (if (<= z 1080000000.0) (+ x (/ (* y t) (- a z))) (+ t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+105) {
tmp = t + x;
} else if (z <= 1080000000.0) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = t + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.2d+105)) then
tmp = t + x
else if (z <= 1080000000.0d0) then
tmp = x + ((y * t) / (a - z))
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+105) {
tmp = t + x;
} else if (z <= 1080000000.0) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.2e+105: tmp = t + x elif z <= 1080000000.0: tmp = x + ((y * t) / (a - z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.2e+105) tmp = Float64(t + x); elseif (z <= 1080000000.0) tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.2e+105) tmp = t + x; elseif (z <= 1080000000.0) tmp = x + ((y * t) / (a - z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.2e+105], N[(t + x), $MachinePrecision], If[LessEqual[z, 1080000000.0], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+105}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 1080000000:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -8.2000000000000005e105 or 1.08e9 < z Initial program 73.2%
Taylor expanded in z around inf
Simplified80.6%
if -8.2000000000000005e105 < z < 1.08e9Initial program 94.9%
Taylor expanded in y around inf
Simplified85.7%
Final simplification83.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* t (/ y (- a z))))) (if (<= y -4e+209) t_1 (if (<= y 1.2e+164) (+ t x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / (a - z));
double tmp;
if (y <= -4e+209) {
tmp = t_1;
} else if (y <= 1.2e+164) {
tmp = t + 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 = t * (y / (a - z))
if (y <= (-4d+209)) then
tmp = t_1
else if (y <= 1.2d+164) then
tmp = t + 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 = t * (y / (a - z));
double tmp;
if (y <= -4e+209) {
tmp = t_1;
} else if (y <= 1.2e+164) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / (a - z)) tmp = 0 if y <= -4e+209: tmp = t_1 elif y <= 1.2e+164: tmp = t + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / Float64(a - z))) tmp = 0.0 if (y <= -4e+209) tmp = t_1; elseif (y <= 1.2e+164) tmp = Float64(t + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / (a - z)); tmp = 0.0; if (y <= -4e+209) tmp = t_1; elseif (y <= 1.2e+164) tmp = t + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+209], t$95$1, If[LessEqual[y, 1.2e+164], N[(t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a - z}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+164}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.0000000000000003e209 or 1.20000000000000005e164 < y Initial program 89.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.3%
Applied egg-rr96.3%
Taylor expanded in y around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6463.4%
Simplified63.4%
if -4.0000000000000003e209 < y < 1.20000000000000005e164Initial program 84.9%
Taylor expanded in z around inf
Simplified70.2%
Final simplification68.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.45e+177) x (if (<= a 5e+139) (+ t x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.45e+177) {
tmp = x;
} else if (a <= 5e+139) {
tmp = t + 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 (a <= (-3.45d+177)) then
tmp = x
else if (a <= 5d+139) then
tmp = t + 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 (a <= -3.45e+177) {
tmp = x;
} else if (a <= 5e+139) {
tmp = t + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.45e+177: tmp = x elif a <= 5e+139: tmp = t + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.45e+177) tmp = x; elseif (a <= 5e+139) tmp = Float64(t + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.45e+177) tmp = x; elseif (a <= 5e+139) tmp = t + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.45e+177], x, If[LessEqual[a, 5e+139], N[(t + x), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.45 \cdot 10^{+177}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.44999999999999986e177 or 5.0000000000000003e139 < a Initial program 82.5%
Taylor expanded in x around inf
Simplified68.2%
if -3.44999999999999986e177 < a < 5.0000000000000003e139Initial program 86.9%
Taylor expanded in z around inf
Simplified64.7%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (if (<= y -9.6e+210) (* t (- 1.0 (/ y z))) (+ t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.6e+210) {
tmp = t * (1.0 - (y / z));
} else {
tmp = t + 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 <= (-9.6d+210)) then
tmp = t * (1.0d0 - (y / z))
else
tmp = t + 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 <= -9.6e+210) {
tmp = t * (1.0 - (y / z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9.6e+210: tmp = t * (1.0 - (y / z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9.6e+210) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9.6e+210) tmp = t * (1.0 - (y / z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.6e+210], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+210}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if y < -9.59999999999999953e210Initial program 92.9%
Taylor expanded in a around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6464.4%
Simplified64.4%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6447.5%
Simplified47.5%
if -9.59999999999999953e210 < y Initial program 85.1%
Taylor expanded in z around inf
Simplified66.2%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -4e-157) x (if (<= x 3.9e-140) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4e-157) {
tmp = x;
} else if (x <= 3.9e-140) {
tmp = t;
} 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 <= (-4d-157)) then
tmp = x
else if (x <= 3.9d-140) then
tmp = t
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 <= -4e-157) {
tmp = x;
} else if (x <= 3.9e-140) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4e-157: tmp = x elif x <= 3.9e-140: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4e-157) tmp = x; elseif (x <= 3.9e-140) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4e-157) tmp = x; elseif (x <= 3.9e-140) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4e-157], x, If[LessEqual[x, 3.9e-140], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{-157}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-140}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.99999999999999977e-157 or 3.90000000000000019e-140 < x Initial program 87.7%
Taylor expanded in x around inf
Simplified60.0%
if -3.99999999999999977e-157 < x < 3.90000000000000019e-140Initial program 80.6%
Taylor expanded in z around inf
Simplified47.8%
Taylor expanded in x around 0
Simplified41.4%
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ t (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - z)));
}
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 - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * (t / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * (t / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t}{a - z}
\end{array}
Initial program 85.9%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6495.1%
Applied egg-rr95.1%
Final simplification95.1%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 85.9%
Taylor expanded in z around inf
Simplified61.5%
Taylor expanded in x around 0
Simplified21.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} 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) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (a - z))
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) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) / (a - z)) * t); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024158
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -10682974490174067/10000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 312887599100691/80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t)))))
(+ x (/ (* (- y z) t) (- a z))))