
(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 12 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 (let* ((t_1 (/ (- x y) (- z y)))) (if (<= t_1 5e+136) (* t_1 t) (* x (/ t (- z y))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) / (z - y);
double tmp;
if (t_1 <= 5e+136) {
tmp = t_1 * t;
} else {
tmp = x * (t / (z - y));
}
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 = (x - y) / (z - y)
if (t_1 <= 5d+136) then
tmp = t_1 * t
else
tmp = x * (t / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - y) / (z - y);
double tmp;
if (t_1 <= 5e+136) {
tmp = t_1 * t;
} else {
tmp = x * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) / (z - y) tmp = 0 if t_1 <= 5e+136: tmp = t_1 * t else: tmp = x * (t / (z - y)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) / Float64(z - y)) tmp = 0.0 if (t_1 <= 5e+136) tmp = Float64(t_1 * t); else tmp = Float64(x * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) / (z - y); tmp = 0.0; if (t_1 <= 5e+136) tmp = t_1 * t; else tmp = x * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+136], N[(t$95$1 * t), $MachinePrecision], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{z - y}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+136}:\\
\;\;\;\;t\_1 \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x y) (-.f64 z y)) < 5.0000000000000002e136Initial program 97.7%
if 5.0000000000000002e136 < (/.f64 (-.f64 x y) (-.f64 z y)) Initial program 78.2%
Taylor expanded in x around inf 100.0%
*-commutative100.0%
associate-*r/99.9%
Simplified99.9%
Final simplification97.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t (- z y)))))
(if (<= y -1.4e+55)
t
(if (<= y -0.085)
t_1
(if (<= y -7.8e-29)
t
(if (<= y -1.45e-196)
t_1
(if (<= y 2.7e-261) (/ (* x t) z) (if (<= y 3.15e+66) t_1 t))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / (z - y));
double tmp;
if (y <= -1.4e+55) {
tmp = t;
} else if (y <= -0.085) {
tmp = t_1;
} else if (y <= -7.8e-29) {
tmp = t;
} else if (y <= -1.45e-196) {
tmp = t_1;
} else if (y <= 2.7e-261) {
tmp = (x * t) / z;
} else if (y <= 3.15e+66) {
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 = x * (t / (z - y))
if (y <= (-1.4d+55)) then
tmp = t
else if (y <= (-0.085d0)) then
tmp = t_1
else if (y <= (-7.8d-29)) then
tmp = t
else if (y <= (-1.45d-196)) then
tmp = t_1
else if (y <= 2.7d-261) then
tmp = (x * t) / z
else if (y <= 3.15d+66) 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 = x * (t / (z - y));
double tmp;
if (y <= -1.4e+55) {
tmp = t;
} else if (y <= -0.085) {
tmp = t_1;
} else if (y <= -7.8e-29) {
tmp = t;
} else if (y <= -1.45e-196) {
tmp = t_1;
} else if (y <= 2.7e-261) {
tmp = (x * t) / z;
} else if (y <= 3.15e+66) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / (z - y)) tmp = 0 if y <= -1.4e+55: tmp = t elif y <= -0.085: tmp = t_1 elif y <= -7.8e-29: tmp = t elif y <= -1.45e-196: tmp = t_1 elif y <= 2.7e-261: tmp = (x * t) / z elif y <= 3.15e+66: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / Float64(z - y))) tmp = 0.0 if (y <= -1.4e+55) tmp = t; elseif (y <= -0.085) tmp = t_1; elseif (y <= -7.8e-29) tmp = t; elseif (y <= -1.45e-196) tmp = t_1; elseif (y <= 2.7e-261) tmp = Float64(Float64(x * t) / z); elseif (y <= 3.15e+66) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / (z - y)); tmp = 0.0; if (y <= -1.4e+55) tmp = t; elseif (y <= -0.085) tmp = t_1; elseif (y <= -7.8e-29) tmp = t; elseif (y <= -1.45e-196) tmp = t_1; elseif (y <= 2.7e-261) tmp = (x * t) / z; elseif (y <= 3.15e+66) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+55], t, If[LessEqual[y, -0.085], t$95$1, If[LessEqual[y, -7.8e-29], t, If[LessEqual[y, -1.45e-196], t$95$1, If[LessEqual[y, 2.7e-261], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 3.15e+66], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z - y}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+55}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -0.085:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-261}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 3.15 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.4e55 or -0.0850000000000000061 < y < -7.7999999999999995e-29 or 3.1499999999999999e66 < y Initial program 99.8%
Taylor expanded in y around inf 66.5%
if -1.4e55 < y < -0.0850000000000000061 or -7.7999999999999995e-29 < y < -1.44999999999999994e-196 or 2.6999999999999999e-261 < y < 3.1499999999999999e66Initial program 93.9%
Taylor expanded in x around inf 73.4%
*-commutative73.4%
associate-*r/77.3%
Simplified77.3%
if -1.44999999999999994e-196 < y < 2.6999999999999999e-261Initial program 89.9%
Taylor expanded in y around 0 91.9%
Final simplification74.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t (- z y)))) (t_2 (* t (- 1.0 (/ x y)))))
(if (<= y -5.5e+51)
t_2
(if (<= y -0.7)
t_1
(if (<= y -7.8e-29)
t
(if (<= y -1.45e-196)
t_1
(if (<= y 6.4e-261) (/ (* x t) z) (if (<= y 6.4e-67) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / (z - y));
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -5.5e+51) {
tmp = t_2;
} else if (y <= -0.7) {
tmp = t_1;
} else if (y <= -7.8e-29) {
tmp = t;
} else if (y <= -1.45e-196) {
tmp = t_1;
} else if (y <= 6.4e-261) {
tmp = (x * t) / z;
} else if (y <= 6.4e-67) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = x * (t / (z - y))
t_2 = t * (1.0d0 - (x / y))
if (y <= (-5.5d+51)) then
tmp = t_2
else if (y <= (-0.7d0)) then
tmp = t_1
else if (y <= (-7.8d-29)) then
tmp = t
else if (y <= (-1.45d-196)) then
tmp = t_1
else if (y <= 6.4d-261) then
tmp = (x * t) / z
else if (y <= 6.4d-67) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t / (z - y));
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -5.5e+51) {
tmp = t_2;
} else if (y <= -0.7) {
tmp = t_1;
} else if (y <= -7.8e-29) {
tmp = t;
} else if (y <= -1.45e-196) {
tmp = t_1;
} else if (y <= 6.4e-261) {
tmp = (x * t) / z;
} else if (y <= 6.4e-67) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / (z - y)) t_2 = t * (1.0 - (x / y)) tmp = 0 if y <= -5.5e+51: tmp = t_2 elif y <= -0.7: tmp = t_1 elif y <= -7.8e-29: tmp = t elif y <= -1.45e-196: tmp = t_1 elif y <= 6.4e-261: tmp = (x * t) / z elif y <= 6.4e-67: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / Float64(z - y))) t_2 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -5.5e+51) tmp = t_2; elseif (y <= -0.7) tmp = t_1; elseif (y <= -7.8e-29) tmp = t; elseif (y <= -1.45e-196) tmp = t_1; elseif (y <= 6.4e-261) tmp = Float64(Float64(x * t) / z); elseif (y <= 6.4e-67) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / (z - y)); t_2 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -5.5e+51) tmp = t_2; elseif (y <= -0.7) tmp = t_1; elseif (y <= -7.8e-29) tmp = t; elseif (y <= -1.45e-196) tmp = t_1; elseif (y <= 6.4e-261) tmp = (x * t) / z; elseif (y <= 6.4e-67) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+51], t$95$2, If[LessEqual[y, -0.7], t$95$1, If[LessEqual[y, -7.8e-29], t, If[LessEqual[y, -1.45e-196], t$95$1, If[LessEqual[y, 6.4e-261], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 6.4e-67], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z - y}\\
t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -0.7:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-261}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.5e51 or 6.40000000000000043e-67 < y Initial program 99.8%
Taylor expanded in z around 0 74.6%
associate-*r/74.6%
neg-mul-174.6%
Simplified74.6%
Taylor expanded in x around 0 74.6%
mul-1-neg74.6%
unsub-neg74.6%
Simplified74.6%
if -5.5e51 < y < -0.69999999999999996 or -7.7999999999999995e-29 < y < -1.44999999999999994e-196 or 6.40000000000000008e-261 < y < 6.40000000000000043e-67Initial program 92.7%
Taylor expanded in x around inf 76.5%
*-commutative76.5%
associate-*r/81.4%
Simplified81.4%
if -0.69999999999999996 < y < -7.7999999999999995e-29Initial program 100.0%
Taylor expanded in y around inf 73.6%
if -1.44999999999999994e-196 < y < 6.40000000000000008e-261Initial program 89.9%
Taylor expanded in y around 0 91.9%
Final simplification79.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.2e+51)
t
(if (<= y -0.105)
(/ t (/ z x))
(if (<= y -7.8e-29)
t
(if (<= y 5.8e-260)
(/ (* x t) z)
(if (<= y 7.1e-7)
(* x (/ t z))
(if (<= y 2e+86) (/ (- (* y t)) z) t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.2e+51) {
tmp = t;
} else if (y <= -0.105) {
tmp = t / (z / x);
} else if (y <= -7.8e-29) {
tmp = t;
} else if (y <= 5.8e-260) {
tmp = (x * t) / z;
} else if (y <= 7.1e-7) {
tmp = x * (t / z);
} else if (y <= 2e+86) {
tmp = -(y * 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 <= (-7.2d+51)) then
tmp = t
else if (y <= (-0.105d0)) then
tmp = t / (z / x)
else if (y <= (-7.8d-29)) then
tmp = t
else if (y <= 5.8d-260) then
tmp = (x * t) / z
else if (y <= 7.1d-7) then
tmp = x * (t / z)
else if (y <= 2d+86) then
tmp = -(y * 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 <= -7.2e+51) {
tmp = t;
} else if (y <= -0.105) {
tmp = t / (z / x);
} else if (y <= -7.8e-29) {
tmp = t;
} else if (y <= 5.8e-260) {
tmp = (x * t) / z;
} else if (y <= 7.1e-7) {
tmp = x * (t / z);
} else if (y <= 2e+86) {
tmp = -(y * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.2e+51: tmp = t elif y <= -0.105: tmp = t / (z / x) elif y <= -7.8e-29: tmp = t elif y <= 5.8e-260: tmp = (x * t) / z elif y <= 7.1e-7: tmp = x * (t / z) elif y <= 2e+86: tmp = -(y * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.2e+51) tmp = t; elseif (y <= -0.105) tmp = Float64(t / Float64(z / x)); elseif (y <= -7.8e-29) tmp = t; elseif (y <= 5.8e-260) tmp = Float64(Float64(x * t) / z); elseif (y <= 7.1e-7) tmp = Float64(x * Float64(t / z)); elseif (y <= 2e+86) tmp = Float64(Float64(-Float64(y * t)) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.2e+51) tmp = t; elseif (y <= -0.105) tmp = t / (z / x); elseif (y <= -7.8e-29) tmp = t; elseif (y <= 5.8e-260) tmp = (x * t) / z; elseif (y <= 7.1e-7) tmp = x * (t / z); elseif (y <= 2e+86) tmp = -(y * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.2e+51], t, If[LessEqual[y, -0.105], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.8e-29], t, If[LessEqual[y, 5.8e-260], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 7.1e-7], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+86], N[((-N[(y * t), $MachinePrecision]) / z), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+51}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -0.105:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-260}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+86}:\\
\;\;\;\;\frac{-y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.20000000000000022e51 or -0.104999999999999996 < y < -7.7999999999999995e-29 or 2e86 < y Initial program 99.9%
Taylor expanded in y around inf 67.7%
if -7.20000000000000022e51 < y < -0.104999999999999996Initial program 99.6%
Taylor expanded in y around 0 44.1%
associate-/l*59.7%
Simplified59.7%
if -7.7999999999999995e-29 < y < 5.7999999999999999e-260Initial program 89.3%
Taylor expanded in y around 0 69.9%
if 5.7999999999999999e-260 < y < 7.0999999999999998e-7Initial program 94.8%
Taylor expanded in y around 0 54.9%
associate-/l*59.5%
associate-/r/62.9%
Simplified62.9%
if 7.0999999999999998e-7 < y < 2e86Initial program 99.6%
Taylor expanded in z around inf 55.4%
associate-/l*55.4%
Simplified55.4%
Taylor expanded in x around 0 43.1%
mul-1-neg43.1%
Simplified43.1%
Final simplification65.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))) (t_2 (* x (/ t (- z y)))))
(if (<= y -1.8e+56)
t_1
(if (<= y -6e-32)
(* y (/ t (- y z)))
(if (<= y -1.6e-195)
t_2
(if (<= y 3.7e-261) (/ (* x t) z) (if (<= y 7.5e-67) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double t_2 = x * (t / (z - y));
double tmp;
if (y <= -1.8e+56) {
tmp = t_1;
} else if (y <= -6e-32) {
tmp = y * (t / (y - z));
} else if (y <= -1.6e-195) {
tmp = t_2;
} else if (y <= 3.7e-261) {
tmp = (x * t) / z;
} else if (y <= 7.5e-67) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
t_2 = x * (t / (z - y))
if (y <= (-1.8d+56)) then
tmp = t_1
else if (y <= (-6d-32)) then
tmp = y * (t / (y - z))
else if (y <= (-1.6d-195)) then
tmp = t_2
else if (y <= 3.7d-261) then
tmp = (x * t) / z
else if (y <= 7.5d-67) then
tmp = t_2
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 * (1.0 - (x / y));
double t_2 = x * (t / (z - y));
double tmp;
if (y <= -1.8e+56) {
tmp = t_1;
} else if (y <= -6e-32) {
tmp = y * (t / (y - z));
} else if (y <= -1.6e-195) {
tmp = t_2;
} else if (y <= 3.7e-261) {
tmp = (x * t) / z;
} else if (y <= 7.5e-67) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) t_2 = x * (t / (z - y)) tmp = 0 if y <= -1.8e+56: tmp = t_1 elif y <= -6e-32: tmp = y * (t / (y - z)) elif y <= -1.6e-195: tmp = t_2 elif y <= 3.7e-261: tmp = (x * t) / z elif y <= 7.5e-67: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) t_2 = Float64(x * Float64(t / Float64(z - y))) tmp = 0.0 if (y <= -1.8e+56) tmp = t_1; elseif (y <= -6e-32) tmp = Float64(y * Float64(t / Float64(y - z))); elseif (y <= -1.6e-195) tmp = t_2; elseif (y <= 3.7e-261) tmp = Float64(Float64(x * t) / z); elseif (y <= 7.5e-67) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); t_2 = x * (t / (z - y)); tmp = 0.0; if (y <= -1.8e+56) tmp = t_1; elseif (y <= -6e-32) tmp = y * (t / (y - z)); elseif (y <= -1.6e-195) tmp = t_2; elseif (y <= 3.7e-261) tmp = (x * t) / z; elseif (y <= 7.5e-67) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+56], t$95$1, If[LessEqual[y, -6e-32], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-195], t$95$2, If[LessEqual[y, 3.7e-261], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 7.5e-67], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
t_2 := x \cdot \frac{t}{z - y}\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-32}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-195}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-261}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-67}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.79999999999999999e56 or 7.5000000000000005e-67 < y Initial program 99.8%
Taylor expanded in z around 0 75.1%
associate-*r/75.1%
neg-mul-175.1%
Simplified75.1%
Taylor expanded in x around 0 75.1%
mul-1-neg75.1%
unsub-neg75.1%
Simplified75.1%
if -1.79999999999999999e56 < y < -6.0000000000000001e-32Initial program 99.7%
Taylor expanded in x around 0 70.2%
neg-mul-170.2%
distribute-neg-frac70.2%
Simplified70.2%
frac-2neg70.2%
remove-double-neg70.2%
associate-*l/70.2%
sub-neg70.2%
distribute-neg-in70.2%
remove-double-neg70.2%
Applied egg-rr70.2%
associate-/l*70.2%
associate-/r/70.2%
+-commutative70.2%
unsub-neg70.2%
Simplified70.2%
Taylor expanded in t around 0 70.2%
associate-/l*70.3%
associate-/r/70.2%
Simplified70.2%
if -6.0000000000000001e-32 < y < -1.6000000000000001e-195 or 3.7000000000000002e-261 < y < 7.5000000000000005e-67Initial program 91.5%
Taylor expanded in x around inf 80.6%
*-commutative80.6%
associate-*r/85.1%
Simplified85.1%
if -1.6000000000000001e-195 < y < 3.7000000000000002e-261Initial program 89.9%
Taylor expanded in y around 0 91.9%
Final simplification79.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -8e+53)
t
(if (or (<= y -0.31) (and (not (<= y -5.2e-29)) (<= y 2.4e-70)))
(* x (/ t z))
t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+53) {
tmp = t;
} else if ((y <= -0.31) || (!(y <= -5.2e-29) && (y <= 2.4e-70))) {
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 <= (-8d+53)) then
tmp = t
else if ((y <= (-0.31d0)) .or. (.not. (y <= (-5.2d-29))) .and. (y <= 2.4d-70)) 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 <= -8e+53) {
tmp = t;
} else if ((y <= -0.31) || (!(y <= -5.2e-29) && (y <= 2.4e-70))) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e+53: tmp = t elif (y <= -0.31) or (not (y <= -5.2e-29) and (y <= 2.4e-70)): tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e+53) tmp = t; elseif ((y <= -0.31) || (!(y <= -5.2e-29) && (y <= 2.4e-70))) 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 <= -8e+53) tmp = t; elseif ((y <= -0.31) || (~((y <= -5.2e-29)) && (y <= 2.4e-70))) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e+53], t, If[Or[LessEqual[y, -0.31], And[N[Not[LessEqual[y, -5.2e-29]], $MachinePrecision], LessEqual[y, 2.4e-70]]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+53}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -0.31 \lor \neg \left(y \leq -5.2 \cdot 10^{-29}\right) \land y \leq 2.4 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.9999999999999999e53 or -0.309999999999999998 < y < -5.2000000000000004e-29 or 2.4000000000000001e-70 < y Initial program 99.8%
Taylor expanded in y around inf 61.0%
if -7.9999999999999999e53 < y < -0.309999999999999998 or -5.2000000000000004e-29 < y < 2.4000000000000001e-70Initial program 92.0%
Taylor expanded in y around 0 64.6%
associate-/l*65.5%
associate-/r/63.2%
Simplified63.2%
Final simplification62.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.65e+52)
t
(if (or (<= y -0.44) (and (not (<= y -7.8e-29)) (<= y 4e+66)))
(* t (/ x z))
t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e+52) {
tmp = t;
} else if ((y <= -0.44) || (!(y <= -7.8e-29) && (y <= 4e+66))) {
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 <= (-1.65d+52)) then
tmp = t
else if ((y <= (-0.44d0)) .or. (.not. (y <= (-7.8d-29))) .and. (y <= 4d+66)) 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 <= -1.65e+52) {
tmp = t;
} else if ((y <= -0.44) || (!(y <= -7.8e-29) && (y <= 4e+66))) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.65e+52: tmp = t elif (y <= -0.44) or (not (y <= -7.8e-29) and (y <= 4e+66)): tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.65e+52) tmp = t; elseif ((y <= -0.44) || (!(y <= -7.8e-29) && (y <= 4e+66))) 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 <= -1.65e+52) tmp = t; elseif ((y <= -0.44) || (~((y <= -7.8e-29)) && (y <= 4e+66))) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.65e+52], t, If[Or[LessEqual[y, -0.44], And[N[Not[LessEqual[y, -7.8e-29]], $MachinePrecision], LessEqual[y, 4e+66]]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+52}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -0.44 \lor \neg \left(y \leq -7.8 \cdot 10^{-29}\right) \land y \leq 4 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.65e52 or -0.440000000000000002 < y < -7.7999999999999995e-29 or 3.99999999999999978e66 < y Initial program 99.8%
Taylor expanded in y around inf 66.5%
if -1.65e52 < y < -0.440000000000000002 or -7.7999999999999995e-29 < y < 3.99999999999999978e66Initial program 93.1%
Taylor expanded in y around 0 61.2%
Final simplification63.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.4e+52)
t
(if (<= y -0.11)
(/ t (/ z x))
(if (<= y -7.8e-29) t (if (<= y 3.1e+66) (* t (/ x z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e+52) {
tmp = t;
} else if (y <= -0.11) {
tmp = t / (z / x);
} else if (y <= -7.8e-29) {
tmp = t;
} else if (y <= 3.1e+66) {
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 <= (-1.4d+52)) then
tmp = t
else if (y <= (-0.11d0)) then
tmp = t / (z / x)
else if (y <= (-7.8d-29)) then
tmp = t
else if (y <= 3.1d+66) 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 <= -1.4e+52) {
tmp = t;
} else if (y <= -0.11) {
tmp = t / (z / x);
} else if (y <= -7.8e-29) {
tmp = t;
} else if (y <= 3.1e+66) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e+52: tmp = t elif y <= -0.11: tmp = t / (z / x) elif y <= -7.8e-29: tmp = t elif y <= 3.1e+66: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e+52) tmp = t; elseif (y <= -0.11) tmp = Float64(t / Float64(z / x)); elseif (y <= -7.8e-29) tmp = t; elseif (y <= 3.1e+66) 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 <= -1.4e+52) tmp = t; elseif (y <= -0.11) tmp = t / (z / x); elseif (y <= -7.8e-29) tmp = t; elseif (y <= 3.1e+66) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e+52], t, If[LessEqual[y, -0.11], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.8e-29], t, If[LessEqual[y, 3.1e+66], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+52}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -0.11:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.4e52 or -0.110000000000000001 < y < -7.7999999999999995e-29 or 3.10000000000000019e66 < y Initial program 99.8%
Taylor expanded in y around inf 66.5%
if -1.4e52 < y < -0.110000000000000001Initial program 99.6%
Taylor expanded in y around 0 44.1%
associate-/l*59.7%
Simplified59.7%
if -7.7999999999999995e-29 < y < 3.10000000000000019e66Initial program 92.6%
Taylor expanded in y around 0 61.4%
Final simplification63.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -8.5e+51)
t
(if (<= y -0.195)
(/ t (/ z x))
(if (<= y -6.6e-29) t (if (<= y 1.35e-76) (/ (* x t) z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.5e+51) {
tmp = t;
} else if (y <= -0.195) {
tmp = t / (z / x);
} else if (y <= -6.6e-29) {
tmp = t;
} else if (y <= 1.35e-76) {
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 <= (-8.5d+51)) then
tmp = t
else if (y <= (-0.195d0)) then
tmp = t / (z / x)
else if (y <= (-6.6d-29)) then
tmp = t
else if (y <= 1.35d-76) 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 <= -8.5e+51) {
tmp = t;
} else if (y <= -0.195) {
tmp = t / (z / x);
} else if (y <= -6.6e-29) {
tmp = t;
} else if (y <= 1.35e-76) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.5e+51: tmp = t elif y <= -0.195: tmp = t / (z / x) elif y <= -6.6e-29: tmp = t elif y <= 1.35e-76: tmp = (x * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.5e+51) tmp = t; elseif (y <= -0.195) tmp = Float64(t / Float64(z / x)); elseif (y <= -6.6e-29) tmp = t; elseif (y <= 1.35e-76) tmp = Float64(Float64(x * t) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.5e+51) tmp = t; elseif (y <= -0.195) tmp = t / (z / x); elseif (y <= -6.6e-29) tmp = t; elseif (y <= 1.35e-76) tmp = (x * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.5e+51], t, If[LessEqual[y, -0.195], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.6e-29], t, If[LessEqual[y, 1.35e-76], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+51}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -0.195:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{-29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-76}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.4999999999999999e51 or -0.19500000000000001 < y < -6.60000000000000055e-29 or 1.35e-76 < y Initial program 99.8%
Taylor expanded in y around inf 60.5%
if -8.4999999999999999e51 < y < -0.19500000000000001Initial program 99.6%
Taylor expanded in y around 0 44.1%
associate-/l*59.7%
Simplified59.7%
if -6.60000000000000055e-29 < y < 1.35e-76Initial program 91.1%
Taylor expanded in y around 0 67.8%
Final simplification63.7%
(FPCore (x y z t) :precision binary64 (if (<= x -1.15e+21) (* t (/ x (- z y))) (if (<= x 2.55e+95) (* t (/ y (- y z))) (* x (/ t (- z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.15e+21) {
tmp = t * (x / (z - y));
} else if (x <= 2.55e+95) {
tmp = t * (y / (y - z));
} else {
tmp = x * (t / (z - y));
}
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 (x <= (-1.15d+21)) then
tmp = t * (x / (z - y))
else if (x <= 2.55d+95) then
tmp = t * (y / (y - z))
else
tmp = x * (t / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.15e+21) {
tmp = t * (x / (z - y));
} else if (x <= 2.55e+95) {
tmp = t * (y / (y - z));
} else {
tmp = x * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.15e+21: tmp = t * (x / (z - y)) elif x <= 2.55e+95: tmp = t * (y / (y - z)) else: tmp = x * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.15e+21) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (x <= 2.55e+95) tmp = Float64(t * Float64(y / Float64(y - z))); else tmp = Float64(x * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.15e+21) tmp = t * (x / (z - y)); elseif (x <= 2.55e+95) tmp = t * (y / (y - z)); else tmp = x * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.15e+21], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.55e+95], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if x < -1.15e21Initial program 98.1%
Taylor expanded in x around inf 76.5%
if -1.15e21 < x < 2.55000000000000001e95Initial program 97.2%
Taylor expanded in x around 0 79.8%
neg-mul-179.8%
distribute-neg-frac79.8%
Simplified79.8%
frac-2neg79.8%
remove-double-neg79.8%
associate-*l/67.6%
sub-neg67.6%
distribute-neg-in67.6%
remove-double-neg67.6%
Applied egg-rr67.6%
associate-/l*66.0%
associate-/r/79.8%
+-commutative79.8%
unsub-neg79.8%
Simplified79.8%
if 2.55000000000000001e95 < x Initial program 89.4%
Taylor expanded in x around inf 79.5%
*-commutative79.5%
associate-*r/79.3%
Simplified79.3%
Final simplification78.9%
(FPCore (x y z t) :precision binary64 (if (<= y -2.8e-98) t (if (<= y 2.25e-80) (* x (/ t y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e-98) {
tmp = t;
} else if (y <= 2.25e-80) {
tmp = x * (t / y);
} 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 <= (-2.8d-98)) then
tmp = t
else if (y <= 2.25d-80) then
tmp = x * (t / y)
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 <= -2.8e-98) {
tmp = t;
} else if (y <= 2.25e-80) {
tmp = x * (t / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.8e-98: tmp = t elif y <= 2.25e-80: tmp = x * (t / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e-98) tmp = t; elseif (y <= 2.25e-80) tmp = Float64(x * Float64(t / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.8e-98) tmp = t; elseif (y <= 2.25e-80) tmp = x * (t / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e-98], t, If[LessEqual[y, 2.25e-80], N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-98}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-80}:\\
\;\;\;\;x \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.7999999999999999e-98 or 2.2500000000000001e-80 < y Initial program 98.0%
Taylor expanded in y around inf 51.8%
if -2.7999999999999999e-98 < y < 2.2500000000000001e-80Initial program 92.5%
Taylor expanded in z around 0 21.8%
associate-*r/21.8%
neg-mul-121.8%
Simplified21.8%
Taylor expanded in x around inf 27.0%
associate-*r/27.0%
neg-mul-127.0%
Simplified27.0%
frac-2neg27.0%
remove-double-neg27.0%
associate-*l/30.1%
*-commutative30.1%
add-sqr-sqrt5.7%
sqrt-unprod10.9%
sqr-neg10.9%
sqrt-unprod9.7%
add-sqr-sqrt17.0%
Applied egg-rr17.0%
associate-/l*13.7%
associate-/r/13.8%
Applied egg-rr13.8%
Final simplification38.3%
(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 96.0%
Taylor expanded in y around inf 34.8%
Final simplification34.8%
(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 2024029
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))