
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 98.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ t y))))
(if (<= y -5.2e+206)
t
(if (<= y -16.0)
t_1
(if (<= y 6.5e-279)
(* x (/ t (- z y)))
(if (<= y 6.8e+17) (* t (/ (- x y) z)) (if (<= y 6.4e+81) t_1 t)))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -5.2e+206) {
tmp = t;
} else if (y <= -16.0) {
tmp = t_1;
} else if (y <= 6.5e-279) {
tmp = x * (t / (z - y));
} else if (y <= 6.8e+17) {
tmp = t * ((x - y) / z);
} else if (y <= 6.4e+81) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - x) * (t / y)
if (y <= (-5.2d+206)) then
tmp = t
else if (y <= (-16.0d0)) then
tmp = t_1
else if (y <= 6.5d-279) then
tmp = x * (t / (z - y))
else if (y <= 6.8d+17) then
tmp = t * ((x - y) / z)
else if (y <= 6.4d+81) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -5.2e+206) {
tmp = t;
} else if (y <= -16.0) {
tmp = t_1;
} else if (y <= 6.5e-279) {
tmp = x * (t / (z - y));
} else if (y <= 6.8e+17) {
tmp = t * ((x - y) / z);
} else if (y <= 6.4e+81) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (t / y) tmp = 0 if y <= -5.2e+206: tmp = t elif y <= -16.0: tmp = t_1 elif y <= 6.5e-279: tmp = x * (t / (z - y)) elif y <= 6.8e+17: tmp = t * ((x - y) / z) elif y <= 6.4e+81: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(t / y)) tmp = 0.0 if (y <= -5.2e+206) tmp = t; elseif (y <= -16.0) tmp = t_1; elseif (y <= 6.5e-279) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 6.8e+17) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= 6.4e+81) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (t / y); tmp = 0.0; if (y <= -5.2e+206) tmp = t; elseif (y <= -16.0) tmp = t_1; elseif (y <= 6.5e-279) tmp = x * (t / (z - y)); elseif (y <= 6.8e+17) tmp = t * ((x - y) / z); elseif (y <= 6.4e+81) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+206], t, If[LessEqual[y, -16.0], t$95$1, If[LessEqual[y, 6.5e-279], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+17], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+81], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+206}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -16:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-279}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+17}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.19999999999999977e206 or 6.4e81 < y Initial program 100.0%
Taylor expanded in y around inf
Simplified80.2%
if -5.19999999999999977e206 < y < -16 or 6.8e17 < y < 6.4e81Initial program 99.8%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6475.4%
Simplified75.4%
*-commutativeN/A
div-invN/A
*-commutativeN/A
sub-negN/A
remove-double-negN/A
distribute-neg-inN/A
+-commutativeN/A
sub-negN/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
--lowering--.f6469.5%
Applied egg-rr69.5%
if -16 < y < 6.4999999999999997e-279Initial program 94.7%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.2%
Applied egg-rr94.2%
Taylor expanded in x around inf
/-lowering-/.f64N/A
--lowering--.f6479.7%
Simplified79.7%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.9%
Applied egg-rr79.9%
if 6.4999999999999997e-279 < y < 6.8e17Initial program 99.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6480.6%
Simplified80.6%
Final simplification77.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ t y))))
(if (<= y -5.8e+200)
t
(if (<= y -7.5)
t_1
(if (<= y 0.0033) (* x (/ t (- z y))) (if (<= y 3.2e+78) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -5.8e+200) {
tmp = t;
} else if (y <= -7.5) {
tmp = t_1;
} else if (y <= 0.0033) {
tmp = x * (t / (z - y));
} else if (y <= 3.2e+78) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - x) * (t / y)
if (y <= (-5.8d+200)) then
tmp = t
else if (y <= (-7.5d0)) then
tmp = t_1
else if (y <= 0.0033d0) then
tmp = x * (t / (z - y))
else if (y <= 3.2d+78) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -5.8e+200) {
tmp = t;
} else if (y <= -7.5) {
tmp = t_1;
} else if (y <= 0.0033) {
tmp = x * (t / (z - y));
} else if (y <= 3.2e+78) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (t / y) tmp = 0 if y <= -5.8e+200: tmp = t elif y <= -7.5: tmp = t_1 elif y <= 0.0033: tmp = x * (t / (z - y)) elif y <= 3.2e+78: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(t / y)) tmp = 0.0 if (y <= -5.8e+200) tmp = t; elseif (y <= -7.5) tmp = t_1; elseif (y <= 0.0033) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 3.2e+78) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (t / y); tmp = 0.0; if (y <= -5.8e+200) tmp = t; elseif (y <= -7.5) tmp = t_1; elseif (y <= 0.0033) tmp = x * (t / (z - y)); elseif (y <= 3.2e+78) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+200], t, If[LessEqual[y, -7.5], t$95$1, If[LessEqual[y, 0.0033], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+78], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+200}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -7.5:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.0033:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.7999999999999998e200 or 3.19999999999999994e78 < y Initial program 100.0%
Taylor expanded in y around inf
Simplified80.2%
if -5.7999999999999998e200 < y < -7.5 or 0.0033 < y < 3.19999999999999994e78Initial program 99.8%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6472.4%
Simplified72.4%
*-commutativeN/A
div-invN/A
*-commutativeN/A
sub-negN/A
remove-double-negN/A
distribute-neg-inN/A
+-commutativeN/A
sub-negN/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
--lowering--.f6467.0%
Applied egg-rr67.0%
if -7.5 < y < 0.0033Initial program 97.0%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.8%
Applied egg-rr96.8%
Taylor expanded in x around inf
/-lowering-/.f64N/A
--lowering--.f6482.4%
Simplified82.4%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.0%
Applied egg-rr78.0%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ t y))))
(if (<= y -5.8e+200)
t
(if (<= y -2.8e-126)
t_1
(if (<= y 1.65e+19) (* (- x y) (/ t z)) (if (<= y 6.4e+81) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -5.8e+200) {
tmp = t;
} else if (y <= -2.8e-126) {
tmp = t_1;
} else if (y <= 1.65e+19) {
tmp = (x - y) * (t / z);
} else if (y <= 6.4e+81) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - x) * (t / y)
if (y <= (-5.8d+200)) then
tmp = t
else if (y <= (-2.8d-126)) then
tmp = t_1
else if (y <= 1.65d+19) then
tmp = (x - y) * (t / z)
else if (y <= 6.4d+81) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -5.8e+200) {
tmp = t;
} else if (y <= -2.8e-126) {
tmp = t_1;
} else if (y <= 1.65e+19) {
tmp = (x - y) * (t / z);
} else if (y <= 6.4e+81) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (t / y) tmp = 0 if y <= -5.8e+200: tmp = t elif y <= -2.8e-126: tmp = t_1 elif y <= 1.65e+19: tmp = (x - y) * (t / z) elif y <= 6.4e+81: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(t / y)) tmp = 0.0 if (y <= -5.8e+200) tmp = t; elseif (y <= -2.8e-126) tmp = t_1; elseif (y <= 1.65e+19) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 6.4e+81) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (t / y); tmp = 0.0; if (y <= -5.8e+200) tmp = t; elseif (y <= -2.8e-126) tmp = t_1; elseif (y <= 1.65e+19) tmp = (x - y) * (t / z); elseif (y <= 6.4e+81) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+200], t, If[LessEqual[y, -2.8e-126], t$95$1, If[LessEqual[y, 1.65e+19], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+81], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+200}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+19}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.7999999999999998e200 or 6.4e81 < y Initial program 100.0%
Taylor expanded in y around inf
Simplified80.2%
if -5.7999999999999998e200 < y < -2.79999999999999992e-126 or 1.65e19 < y < 6.4e81Initial program 99.8%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6468.5%
Simplified68.5%
*-commutativeN/A
div-invN/A
*-commutativeN/A
sub-negN/A
remove-double-negN/A
distribute-neg-inN/A
+-commutativeN/A
sub-negN/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
--lowering--.f6463.4%
Applied egg-rr63.4%
if -2.79999999999999992e-126 < y < 1.65e19Initial program 96.5%
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6492.5%
Simplified92.5%
Taylor expanded in z around inf
Simplified78.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.6%
Applied egg-rr78.6%
Final simplification74.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ t y))))
(if (<= y -5.8e+200)
t
(if (<= y -2.75e-126)
t_1
(if (<= y 0.00195) (* t (/ x z)) (if (<= y 6.4e+81) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -5.8e+200) {
tmp = t;
} else if (y <= -2.75e-126) {
tmp = t_1;
} else if (y <= 0.00195) {
tmp = t * (x / z);
} else if (y <= 6.4e+81) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - x) * (t / y)
if (y <= (-5.8d+200)) then
tmp = t
else if (y <= (-2.75d-126)) then
tmp = t_1
else if (y <= 0.00195d0) then
tmp = t * (x / z)
else if (y <= 6.4d+81) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -5.8e+200) {
tmp = t;
} else if (y <= -2.75e-126) {
tmp = t_1;
} else if (y <= 0.00195) {
tmp = t * (x / z);
} else if (y <= 6.4e+81) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (t / y) tmp = 0 if y <= -5.8e+200: tmp = t elif y <= -2.75e-126: tmp = t_1 elif y <= 0.00195: tmp = t * (x / z) elif y <= 6.4e+81: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(t / y)) tmp = 0.0 if (y <= -5.8e+200) tmp = t; elseif (y <= -2.75e-126) tmp = t_1; elseif (y <= 0.00195) tmp = Float64(t * Float64(x / z)); elseif (y <= 6.4e+81) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (t / y); tmp = 0.0; if (y <= -5.8e+200) tmp = t; elseif (y <= -2.75e-126) tmp = t_1; elseif (y <= 0.00195) tmp = t * (x / z); elseif (y <= 6.4e+81) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+200], t, If[LessEqual[y, -2.75e-126], t$95$1, If[LessEqual[y, 0.00195], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+81], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+200}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.75 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.00195:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.7999999999999998e200 or 6.4e81 < y Initial program 100.0%
Taylor expanded in y around inf
Simplified80.2%
if -5.7999999999999998e200 < y < -2.74999999999999993e-126 or 0.0019499999999999999 < y < 6.4e81Initial program 99.8%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6466.8%
Simplified66.8%
*-commutativeN/A
div-invN/A
*-commutativeN/A
sub-negN/A
remove-double-negN/A
distribute-neg-inN/A
+-commutativeN/A
sub-negN/A
associate-*r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
--lowering--.f6462.0%
Applied egg-rr62.0%
if -2.74999999999999993e-126 < y < 0.0019499999999999999Initial program 96.3%
Taylor expanded in y around 0
/-lowering-/.f6477.8%
Simplified77.8%
Final simplification72.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -31.0)
(* t (/ (- y x) y))
(if (<= y 3.9e-263)
(* x (/ t (- z y)))
(if (<= y 3.3e+21) (/ t (/ z (- x y))) (- t (/ t (/ y x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -31.0) {
tmp = t * ((y - x) / y);
} else if (y <= 3.9e-263) {
tmp = x * (t / (z - y));
} else if (y <= 3.3e+21) {
tmp = t / (z / (x - y));
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-31.0d0)) then
tmp = t * ((y - x) / y)
else if (y <= 3.9d-263) then
tmp = x * (t / (z - y))
else if (y <= 3.3d+21) then
tmp = t / (z / (x - y))
else
tmp = t - (t / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -31.0) {
tmp = t * ((y - x) / y);
} else if (y <= 3.9e-263) {
tmp = x * (t / (z - y));
} else if (y <= 3.3e+21) {
tmp = t / (z / (x - y));
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -31.0: tmp = t * ((y - x) / y) elif y <= 3.9e-263: tmp = x * (t / (z - y)) elif y <= 3.3e+21: tmp = t / (z / (x - y)) else: tmp = t - (t / (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -31.0) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= 3.9e-263) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 3.3e+21) tmp = Float64(t / Float64(z / Float64(x - y))); else tmp = Float64(t - Float64(t / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -31.0) tmp = t * ((y - x) / y); elseif (y <= 3.9e-263) tmp = x * (t / (z - y)); elseif (y <= 3.3e+21) tmp = t / (z / (x - y)); else tmp = t - (t / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -31.0], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e-263], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+21], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -31:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-263}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+21}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < -31Initial program 99.8%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6475.7%
Simplified75.7%
if -31 < y < 3.8999999999999997e-263Initial program 94.9%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.5%
Applied egg-rr94.5%
Taylor expanded in x around inf
/-lowering-/.f64N/A
--lowering--.f6480.6%
Simplified80.6%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6480.7%
Applied egg-rr80.7%
if 3.8999999999999997e-263 < y < 3.3e21Initial program 99.8%
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6495.1%
Simplified95.1%
Taylor expanded in z around inf
Simplified75.0%
associate-/l*N/A
*-commutativeN/A
flip3--N/A
clear-numN/A
frac-timesN/A
*-rgt-identityN/A
clear-numN/A
flip3--N/A
div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.7%
Applied egg-rr79.7%
if 3.3e21 < y Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6487.5%
Simplified87.5%
Taylor expanded in y around inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.9%
Simplified76.9%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6487.5%
Applied egg-rr87.5%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -60.0)
(* t (/ (- y x) y))
(if (<= y 2.4e-279)
(* x (/ t (- z y)))
(if (<= y 2.4e+21) (* t (/ (- x y) z)) (- t (/ t (/ y x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -60.0) {
tmp = t * ((y - x) / y);
} else if (y <= 2.4e-279) {
tmp = x * (t / (z - y));
} else if (y <= 2.4e+21) {
tmp = t * ((x - y) / z);
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-60.0d0)) then
tmp = t * ((y - x) / y)
else if (y <= 2.4d-279) then
tmp = x * (t / (z - y))
else if (y <= 2.4d+21) then
tmp = t * ((x - y) / z)
else
tmp = t - (t / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -60.0) {
tmp = t * ((y - x) / y);
} else if (y <= 2.4e-279) {
tmp = x * (t / (z - y));
} else if (y <= 2.4e+21) {
tmp = t * ((x - y) / z);
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -60.0: tmp = t * ((y - x) / y) elif y <= 2.4e-279: tmp = x * (t / (z - y)) elif y <= 2.4e+21: tmp = t * ((x - y) / z) else: tmp = t - (t / (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -60.0) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= 2.4e-279) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 2.4e+21) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = Float64(t - Float64(t / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -60.0) tmp = t * ((y - x) / y); elseif (y <= 2.4e-279) tmp = x * (t / (z - y)); elseif (y <= 2.4e+21) tmp = t * ((x - y) / z); else tmp = t - (t / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -60.0], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e-279], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+21], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -60:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-279}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < -60Initial program 99.8%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6475.7%
Simplified75.7%
if -60 < y < 2.3999999999999999e-279Initial program 94.7%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.2%
Applied egg-rr94.2%
Taylor expanded in x around inf
/-lowering-/.f64N/A
--lowering--.f6479.7%
Simplified79.7%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.9%
Applied egg-rr79.9%
if 2.3999999999999999e-279 < y < 2.4e21Initial program 99.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6480.6%
Simplified80.6%
if 2.4e21 < y Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6487.5%
Simplified87.5%
Taylor expanded in y around inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.9%
Simplified76.9%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6487.5%
Applied egg-rr87.5%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- y x) y))))
(if (<= y -6.0)
t_1
(if (<= y 4.5e-279)
(* x (/ t (- z y)))
(if (<= y 1.3e+18) (* t (/ (- x y) z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double tmp;
if (y <= -6.0) {
tmp = t_1;
} else if (y <= 4.5e-279) {
tmp = x * (t / (z - y));
} else if (y <= 1.3e+18) {
tmp = t * ((x - y) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - x) / y)
if (y <= (-6.0d0)) then
tmp = t_1
else if (y <= 4.5d-279) then
tmp = x * (t / (z - y))
else if (y <= 1.3d+18) then
tmp = t * ((x - y) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double tmp;
if (y <= -6.0) {
tmp = t_1;
} else if (y <= 4.5e-279) {
tmp = x * (t / (z - y));
} else if (y <= 1.3e+18) {
tmp = t * ((x - y) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((y - x) / y) tmp = 0 if y <= -6.0: tmp = t_1 elif y <= 4.5e-279: tmp = x * (t / (z - y)) elif y <= 1.3e+18: tmp = t * ((x - y) / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(y - x) / y)) tmp = 0.0 if (y <= -6.0) tmp = t_1; elseif (y <= 4.5e-279) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 1.3e+18) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((y - x) / y); tmp = 0.0; if (y <= -6.0) tmp = t_1; elseif (y <= 4.5e-279) tmp = x * (t / (z - y)); elseif (y <= 1.3e+18) tmp = t * ((x - y) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.0], t$95$1, If[LessEqual[y, 4.5e-279], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+18], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - x}{y}\\
\mathbf{if}\;y \leq -6:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-279}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+18}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6 or 1.3e18 < y Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6481.6%
Simplified81.6%
if -6 < y < 4.49999999999999995e-279Initial program 94.7%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.2%
Applied egg-rr94.2%
Taylor expanded in x around inf
/-lowering-/.f64N/A
--lowering--.f6479.7%
Simplified79.7%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.9%
Applied egg-rr79.9%
if 4.49999999999999995e-279 < y < 1.3e18Initial program 99.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6480.6%
Simplified80.6%
Final simplification80.9%
(FPCore (x y z t) :precision binary64 (if (<= y -9.6e+158) (* t (/ (- y x) y)) (if (<= y 1.65e+22) (* (- x y) (/ t (- z y))) (- t (/ t (/ y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.6e+158) {
tmp = t * ((y - x) / y);
} else if (y <= 1.65e+22) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-9.6d+158)) then
tmp = t * ((y - x) / y)
else if (y <= 1.65d+22) then
tmp = (x - y) * (t / (z - y))
else
tmp = t - (t / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.6e+158) {
tmp = t * ((y - x) / y);
} else if (y <= 1.65e+22) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.6e+158: tmp = t * ((y - x) / y) elif y <= 1.65e+22: tmp = (x - y) * (t / (z - y)) else: tmp = t - (t / (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.6e+158) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= 1.65e+22) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = Float64(t - Float64(t / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.6e+158) tmp = t * ((y - x) / y); elseif (y <= 1.65e+22) tmp = (x - y) * (t / (z - y)); else tmp = t - (t / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.6e+158], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+22], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+158}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+22}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < -9.60000000000000033e158Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6487.4%
Simplified87.4%
if -9.60000000000000033e158 < y < 1.6499999999999999e22Initial program 97.7%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6490.8%
Applied egg-rr90.8%
if 1.6499999999999999e22 < y Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6487.5%
Simplified87.5%
Taylor expanded in y around inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.9%
Simplified76.9%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6487.5%
Applied egg-rr87.5%
Final simplification89.6%
(FPCore (x y z t) :precision binary64 (if (<= y -8.8e+102) (* t (/ (- y x) y)) (if (<= y 0.0026) (/ t (/ (- z y) x)) (- t (/ t (/ y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+102) {
tmp = t * ((y - x) / y);
} else if (y <= 0.0026) {
tmp = t / ((z - y) / x);
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.8d+102)) then
tmp = t * ((y - x) / y)
else if (y <= 0.0026d0) then
tmp = t / ((z - y) / x)
else
tmp = t - (t / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+102) {
tmp = t * ((y - x) / y);
} else if (y <= 0.0026) {
tmp = t / ((z - y) / x);
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.8e+102: tmp = t * ((y - x) / y) elif y <= 0.0026: tmp = t / ((z - y) / x) else: tmp = t - (t / (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.8e+102) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= 0.0026) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = Float64(t - Float64(t / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.8e+102) tmp = t * ((y - x) / y); elseif (y <= 0.0026) tmp = t / ((z - y) / x); else tmp = t - (t / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.8e+102], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0026], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+102}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq 0.0026:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < -8.8000000000000003e102Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6486.8%
Simplified86.8%
if -8.8000000000000003e102 < y < 0.0025999999999999999Initial program 97.4%
*-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 x around inf
/-lowering-/.f64N/A
--lowering--.f6479.0%
Simplified79.0%
if 0.0025999999999999999 < y Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6483.5%
Simplified83.5%
Taylor expanded in y around inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6473.9%
Simplified73.9%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6483.6%
Applied egg-rr83.6%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (<= y -8.8e+102) t (if (<= y 0.0042) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+102) {
tmp = t;
} else if (y <= 0.0042) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.8d+102)) then
tmp = t
else if (y <= 0.0042d0) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+102) {
tmp = t;
} else if (y <= 0.0042) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.8e+102: tmp = t elif y <= 0.0042: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.8e+102) tmp = t; elseif (y <= 0.0042) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.8e+102) tmp = t; elseif (y <= 0.0042) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.8e+102], t, If[LessEqual[y, 0.0042], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+102}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.0042:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.8000000000000003e102 or 0.00419999999999999974 < y Initial program 99.9%
Taylor expanded in y around inf
Simplified69.3%
if -8.8000000000000003e102 < y < 0.00419999999999999974Initial program 97.4%
Taylor expanded in y around 0
/-lowering-/.f6466.5%
Simplified66.5%
Final simplification67.7%
(FPCore (x y z t) :precision binary64 (if (<= y -350.0) t (if (<= y 0.005) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -350.0) {
tmp = t;
} else if (y <= 0.005) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-350.0d0)) then
tmp = t
else if (y <= 0.005d0) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -350.0) {
tmp = t;
} else if (y <= 0.005) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -350.0: tmp = t elif y <= 0.005: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -350.0) tmp = t; elseif (y <= 0.005) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -350.0) tmp = t; elseif (y <= 0.005) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -350.0], t, If[LessEqual[y, 0.005], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -350:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.005:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -350 or 0.0050000000000000001 < y Initial program 99.9%
Taylor expanded in y around inf
Simplified64.5%
if -350 < y < 0.0050000000000000001Initial program 97.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6465.6%
Simplified65.6%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 98.5%
Taylor expanded in y around inf
Simplified37.7%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024152
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(! :herbie-platform default (/ t (/ (- z y) (- x y))))
(* (/ (- x y) (- z y)) t))