
(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 17 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 (/ 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}
Initial program 96.1%
associate-*l/83.3%
associate-/l*86.3%
Simplified86.3%
associate-*r/83.3%
associate-*l/96.1%
*-commutative96.1%
clear-num96.1%
un-div-inv96.2%
Applied egg-rr96.2%
Final simplification96.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* t y) (- y z))))
(if (<= y -3.8e+172)
t
(if (<= y -1.6e+39)
t_1
(if (<= y -2.15e-169)
(/ (* t x) (- z y))
(if (<= y 4.8e-72)
(/ (* t (- x y)) z)
(if (<= y 3e+25) (* t (/ x (- z y))) (if (<= y 1e+154) t_1 t))))))))
double code(double x, double y, double z, double t) {
double t_1 = (t * y) / (y - z);
double tmp;
if (y <= -3.8e+172) {
tmp = t;
} else if (y <= -1.6e+39) {
tmp = t_1;
} else if (y <= -2.15e-169) {
tmp = (t * x) / (z - y);
} else if (y <= 4.8e-72) {
tmp = (t * (x - y)) / z;
} else if (y <= 3e+25) {
tmp = t * (x / (z - y));
} else if (y <= 1e+154) {
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 = (t * y) / (y - z)
if (y <= (-3.8d+172)) then
tmp = t
else if (y <= (-1.6d+39)) then
tmp = t_1
else if (y <= (-2.15d-169)) then
tmp = (t * x) / (z - y)
else if (y <= 4.8d-72) then
tmp = (t * (x - y)) / z
else if (y <= 3d+25) then
tmp = t * (x / (z - y))
else if (y <= 1d+154) 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 = (t * y) / (y - z);
double tmp;
if (y <= -3.8e+172) {
tmp = t;
} else if (y <= -1.6e+39) {
tmp = t_1;
} else if (y <= -2.15e-169) {
tmp = (t * x) / (z - y);
} else if (y <= 4.8e-72) {
tmp = (t * (x - y)) / z;
} else if (y <= 3e+25) {
tmp = t * (x / (z - y));
} else if (y <= 1e+154) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (t * y) / (y - z) tmp = 0 if y <= -3.8e+172: tmp = t elif y <= -1.6e+39: tmp = t_1 elif y <= -2.15e-169: tmp = (t * x) / (z - y) elif y <= 4.8e-72: tmp = (t * (x - y)) / z elif y <= 3e+25: tmp = t * (x / (z - y)) elif y <= 1e+154: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t * y) / Float64(y - z)) tmp = 0.0 if (y <= -3.8e+172) tmp = t; elseif (y <= -1.6e+39) tmp = t_1; elseif (y <= -2.15e-169) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (y <= 4.8e-72) tmp = Float64(Float64(t * Float64(x - y)) / z); elseif (y <= 3e+25) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 1e+154) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t * y) / (y - z); tmp = 0.0; if (y <= -3.8e+172) tmp = t; elseif (y <= -1.6e+39) tmp = t_1; elseif (y <= -2.15e-169) tmp = (t * x) / (z - y); elseif (y <= 4.8e-72) tmp = (t * (x - y)) / z; elseif (y <= 3e+25) tmp = t * (x / (z - y)); elseif (y <= 1e+154) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * y), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+172], t, If[LessEqual[y, -1.6e+39], t$95$1, If[LessEqual[y, -2.15e-169], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-72], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 3e+25], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+154], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot y}{y - z}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+172}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-169}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-72}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+25}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.7999999999999997e172 or 1.00000000000000004e154 < y Initial program 99.9%
associate-*l/58.9%
associate-/l*73.8%
Simplified73.8%
Taylor expanded in y around inf 89.2%
if -3.7999999999999997e172 < y < -1.59999999999999996e39 or 3.00000000000000006e25 < y < 1.00000000000000004e154Initial program 99.7%
associate-*l/83.0%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in x around 0 71.0%
mul-1-neg71.0%
Simplified71.0%
if -1.59999999999999996e39 < y < -2.14999999999999992e-169Initial program 95.1%
associate-*l/99.8%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in x around inf 71.5%
if -2.14999999999999992e-169 < y < 4.8e-72Initial program 90.5%
associate-*l/92.9%
associate-/l*88.7%
Simplified88.7%
Taylor expanded in z around inf 82.7%
if 4.8e-72 < y < 3.00000000000000006e25Initial program 99.7%
Taylor expanded in x around inf 86.8%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ t (- y z)))))
(if (<= y -6.4e+183)
t
(if (<= y -1.04e+40)
t_1
(if (<= y -2.75e-170)
(/ (* t x) (- z y))
(if (<= y 1.65e-72)
(/ (* t (- x y)) z)
(if (<= y 7.8e+31)
(* t (/ x (- z y)))
(if (<= y 3.9e+174) t_1 t))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t / (y - z));
double tmp;
if (y <= -6.4e+183) {
tmp = t;
} else if (y <= -1.04e+40) {
tmp = t_1;
} else if (y <= -2.75e-170) {
tmp = (t * x) / (z - y);
} else if (y <= 1.65e-72) {
tmp = (t * (x - y)) / z;
} else if (y <= 7.8e+31) {
tmp = t * (x / (z - y));
} else if (y <= 3.9e+174) {
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 * (t / (y - z))
if (y <= (-6.4d+183)) then
tmp = t
else if (y <= (-1.04d+40)) then
tmp = t_1
else if (y <= (-2.75d-170)) then
tmp = (t * x) / (z - y)
else if (y <= 1.65d-72) then
tmp = (t * (x - y)) / z
else if (y <= 7.8d+31) then
tmp = t * (x / (z - y))
else if (y <= 3.9d+174) 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 * (t / (y - z));
double tmp;
if (y <= -6.4e+183) {
tmp = t;
} else if (y <= -1.04e+40) {
tmp = t_1;
} else if (y <= -2.75e-170) {
tmp = (t * x) / (z - y);
} else if (y <= 1.65e-72) {
tmp = (t * (x - y)) / z;
} else if (y <= 7.8e+31) {
tmp = t * (x / (z - y));
} else if (y <= 3.9e+174) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t / (y - z)) tmp = 0 if y <= -6.4e+183: tmp = t elif y <= -1.04e+40: tmp = t_1 elif y <= -2.75e-170: tmp = (t * x) / (z - y) elif y <= 1.65e-72: tmp = (t * (x - y)) / z elif y <= 7.8e+31: tmp = t * (x / (z - y)) elif y <= 3.9e+174: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t / Float64(y - z))) tmp = 0.0 if (y <= -6.4e+183) tmp = t; elseif (y <= -1.04e+40) tmp = t_1; elseif (y <= -2.75e-170) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (y <= 1.65e-72) tmp = Float64(Float64(t * Float64(x - y)) / z); elseif (y <= 7.8e+31) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 3.9e+174) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t / (y - z)); tmp = 0.0; if (y <= -6.4e+183) tmp = t; elseif (y <= -1.04e+40) tmp = t_1; elseif (y <= -2.75e-170) tmp = (t * x) / (z - y); elseif (y <= 1.65e-72) tmp = (t * (x - y)) / z; elseif (y <= 7.8e+31) tmp = t * (x / (z - y)); elseif (y <= 3.9e+174) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.4e+183], t, If[LessEqual[y, -1.04e+40], t$95$1, If[LessEqual[y, -2.75e-170], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e-72], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 7.8e+31], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+174], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{y - z}\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+183}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.04 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.75 \cdot 10^{-170}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-72}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+31}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -6.4000000000000004e183 or 3.89999999999999981e174 < y Initial program 99.9%
associate-*l/61.5%
associate-/l*71.6%
Simplified71.6%
Taylor expanded in y around inf 89.3%
if -6.4000000000000004e183 < y < -1.04e40 or 7.79999999999999999e31 < y < 3.89999999999999981e174Initial program 99.8%
associate-*l/77.7%
associate-/l*89.4%
Simplified89.4%
associate-*r/77.7%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 67.2%
associate-*r/67.2%
neg-mul-167.2%
distribute-rgt-neg-in67.2%
associate-*l/76.9%
Simplified76.9%
if -1.04e40 < y < -2.75000000000000009e-170Initial program 95.1%
associate-*l/99.8%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in x around inf 71.5%
if -2.75000000000000009e-170 < y < 1.65e-72Initial program 90.5%
associate-*l/92.9%
associate-/l*88.7%
Simplified88.7%
Taylor expanded in z around inf 82.7%
if 1.65e-72 < y < 7.79999999999999999e31Initial program 99.7%
Taylor expanded in x around inf 86.8%
Final simplification81.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t (- z y)))))
(if (<= y -4.5e+190)
(/ t (/ y (- y x)))
(if (<= y -7.5e-277)
t_1
(if (<= y 6.8e-140)
(/ (* t (- x y)) z)
(if (<= y 5.2e+82) t_1 (* t (/ y (- y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / (z - y));
double tmp;
if (y <= -4.5e+190) {
tmp = t / (y / (y - x));
} else if (y <= -7.5e-277) {
tmp = t_1;
} else if (y <= 6.8e-140) {
tmp = (t * (x - y)) / z;
} else if (y <= 5.2e+82) {
tmp = t_1;
} else {
tmp = t * (y / (y - z));
}
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) * (t / (z - y))
if (y <= (-4.5d+190)) then
tmp = t / (y / (y - x))
else if (y <= (-7.5d-277)) then
tmp = t_1
else if (y <= 6.8d-140) then
tmp = (t * (x - y)) / z
else if (y <= 5.2d+82) then
tmp = t_1
else
tmp = t * (y / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / (z - y));
double tmp;
if (y <= -4.5e+190) {
tmp = t / (y / (y - x));
} else if (y <= -7.5e-277) {
tmp = t_1;
} else if (y <= 6.8e-140) {
tmp = (t * (x - y)) / z;
} else if (y <= 5.2e+82) {
tmp = t_1;
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / (z - y)) tmp = 0 if y <= -4.5e+190: tmp = t / (y / (y - x)) elif y <= -7.5e-277: tmp = t_1 elif y <= 6.8e-140: tmp = (t * (x - y)) / z elif y <= 5.2e+82: tmp = t_1 else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / Float64(z - y))) tmp = 0.0 if (y <= -4.5e+190) tmp = Float64(t / Float64(y / Float64(y - x))); elseif (y <= -7.5e-277) tmp = t_1; elseif (y <= 6.8e-140) tmp = Float64(Float64(t * Float64(x - y)) / z); elseif (y <= 5.2e+82) tmp = t_1; else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / (z - y)); tmp = 0.0; if (y <= -4.5e+190) tmp = t / (y / (y - x)); elseif (y <= -7.5e-277) tmp = t_1; elseif (y <= 6.8e-140) tmp = (t * (x - y)) / z; elseif (y <= 5.2e+82) tmp = t_1; else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+190], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.5e-277], t$95$1, If[LessEqual[y, 6.8e-140], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 5.2e+82], t$95$1, N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+190}:\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-277}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-140}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -4.4999999999999999e190Initial program 99.9%
associate-*l/66.6%
associate-/l*68.3%
Simplified68.3%
associate-*r/66.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 95.3%
neg-mul-195.3%
distribute-neg-frac295.3%
neg-sub095.3%
associate--r-95.3%
neg-sub095.3%
Simplified95.3%
if -4.4999999999999999e190 < y < -7.49999999999999971e-277 or 6.80000000000000017e-140 < y < 5.1999999999999997e82Initial program 96.3%
associate-*l/86.9%
associate-/l*93.6%
Simplified93.6%
if -7.49999999999999971e-277 < y < 6.80000000000000017e-140Initial program 89.5%
associate-*l/97.8%
associate-/l*82.4%
Simplified82.4%
Taylor expanded in z around inf 91.6%
if 5.1999999999999997e82 < y Initial program 99.9%
Taylor expanded in x around 0 93.2%
neg-mul-193.2%
distribute-neg-frac93.2%
Simplified93.2%
Final simplification93.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.55e+39)
t
(if (<= y 2.1e-97)
(/ (* t x) (- z y))
(if (<= y 2.2e-69)
(* (- x y) (/ t z))
(if (<= y 2.75e+48) (* t (/ x (- z y))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.55e+39) {
tmp = t;
} else if (y <= 2.1e-97) {
tmp = (t * x) / (z - y);
} else if (y <= 2.2e-69) {
tmp = (x - y) * (t / z);
} else if (y <= 2.75e+48) {
tmp = t * (x / (z - 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.55d+39)) then
tmp = t
else if (y <= 2.1d-97) then
tmp = (t * x) / (z - y)
else if (y <= 2.2d-69) then
tmp = (x - y) * (t / z)
else if (y <= 2.75d+48) then
tmp = t * (x / (z - 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.55e+39) {
tmp = t;
} else if (y <= 2.1e-97) {
tmp = (t * x) / (z - y);
} else if (y <= 2.2e-69) {
tmp = (x - y) * (t / z);
} else if (y <= 2.75e+48) {
tmp = t * (x / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.55e+39: tmp = t elif y <= 2.1e-97: tmp = (t * x) / (z - y) elif y <= 2.2e-69: tmp = (x - y) * (t / z) elif y <= 2.75e+48: tmp = t * (x / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.55e+39) tmp = t; elseif (y <= 2.1e-97) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (y <= 2.2e-69) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 2.75e+48) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.55e+39) tmp = t; elseif (y <= 2.1e-97) tmp = (t * x) / (z - y); elseif (y <= 2.2e-69) tmp = (x - y) * (t / z); elseif (y <= 2.75e+48) tmp = t * (x / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.55e+39], t, If[LessEqual[y, 2.1e-97], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-69], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e+48], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.55 \cdot 10^{+39}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-97}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-69}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+48}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.5499999999999999e39 or 2.7500000000000001e48 < y Initial program 99.8%
associate-*l/69.8%
associate-/l*81.0%
Simplified81.0%
Taylor expanded in y around inf 72.1%
if -2.5499999999999999e39 < y < 2.1000000000000001e-97Initial program 91.4%
associate-*l/94.8%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in x around inf 77.9%
if 2.1000000000000001e-97 < y < 2.2e-69Initial program 99.7%
associate-*l/90.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 83.1%
if 2.2e-69 < y < 2.7500000000000001e48Initial program 99.7%
Taylor expanded in x around inf 81.8%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.25e+44)
t
(if (<= y -4.3e-170)
(/ (* t x) (- z y))
(if (<= y 8e-72)
(/ (* t (- x y)) z)
(if (<= y 6.6e+44) (* t (/ x (- z y))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e+44) {
tmp = t;
} else if (y <= -4.3e-170) {
tmp = (t * x) / (z - y);
} else if (y <= 8e-72) {
tmp = (t * (x - y)) / z;
} else if (y <= 6.6e+44) {
tmp = t * (x / (z - 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 <= (-1.25d+44)) then
tmp = t
else if (y <= (-4.3d-170)) then
tmp = (t * x) / (z - y)
else if (y <= 8d-72) then
tmp = (t * (x - y)) / z
else if (y <= 6.6d+44) then
tmp = t * (x / (z - 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 <= -1.25e+44) {
tmp = t;
} else if (y <= -4.3e-170) {
tmp = (t * x) / (z - y);
} else if (y <= 8e-72) {
tmp = (t * (x - y)) / z;
} else if (y <= 6.6e+44) {
tmp = t * (x / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.25e+44: tmp = t elif y <= -4.3e-170: tmp = (t * x) / (z - y) elif y <= 8e-72: tmp = (t * (x - y)) / z elif y <= 6.6e+44: tmp = t * (x / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.25e+44) tmp = t; elseif (y <= -4.3e-170) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (y <= 8e-72) tmp = Float64(Float64(t * Float64(x - y)) / z); elseif (y <= 6.6e+44) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.25e+44) tmp = t; elseif (y <= -4.3e-170) tmp = (t * x) / (z - y); elseif (y <= 8e-72) tmp = (t * (x - y)) / z; elseif (y <= 6.6e+44) tmp = t * (x / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.25e+44], t, If[LessEqual[y, -4.3e-170], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-72], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 6.6e+44], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+44}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -4.3 \cdot 10^{-170}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-72}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.2499999999999999e44 or 6.60000000000000027e44 < y Initial program 99.8%
associate-*l/69.8%
associate-/l*81.0%
Simplified81.0%
Taylor expanded in y around inf 72.1%
if -1.2499999999999999e44 < y < -4.2999999999999998e-170Initial program 95.1%
associate-*l/99.8%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in x around inf 71.5%
if -4.2999999999999998e-170 < y < 7.9999999999999997e-72Initial program 90.5%
associate-*l/92.9%
associate-/l*88.7%
Simplified88.7%
Taylor expanded in z around inf 82.7%
if 7.9999999999999997e-72 < y < 6.60000000000000027e44Initial program 99.7%
Taylor expanded in x around inf 82.8%
Final simplification76.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -2.3e+39)
t_1
(if (<= y -1.8e-169)
(/ (* t x) (- z y))
(if (<= y 2.15e-72)
(/ (* t (- x y)) z)
(if (<= y 2.3e+25) (* t (/ x (- z y))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double tmp;
if (y <= -2.3e+39) {
tmp = t_1;
} else if (y <= -1.8e-169) {
tmp = (t * x) / (z - y);
} else if (y <= 2.15e-72) {
tmp = (t * (x - y)) / z;
} else if (y <= 2.3e+25) {
tmp = t * (x / (z - y));
} 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 / (y - z))
if (y <= (-2.3d+39)) then
tmp = t_1
else if (y <= (-1.8d-169)) then
tmp = (t * x) / (z - y)
else if (y <= 2.15d-72) then
tmp = (t * (x - y)) / z
else if (y <= 2.3d+25) then
tmp = t * (x / (z - y))
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 / (y - z));
double tmp;
if (y <= -2.3e+39) {
tmp = t_1;
} else if (y <= -1.8e-169) {
tmp = (t * x) / (z - y);
} else if (y <= 2.15e-72) {
tmp = (t * (x - y)) / z;
} else if (y <= 2.3e+25) {
tmp = t * (x / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) tmp = 0 if y <= -2.3e+39: tmp = t_1 elif y <= -1.8e-169: tmp = (t * x) / (z - y) elif y <= 2.15e-72: tmp = (t * (x - y)) / z elif y <= 2.3e+25: tmp = t * (x / (z - y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -2.3e+39) tmp = t_1; elseif (y <= -1.8e-169) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (y <= 2.15e-72) tmp = Float64(Float64(t * Float64(x - y)) / z); elseif (y <= 2.3e+25) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); tmp = 0.0; if (y <= -2.3e+39) tmp = t_1; elseif (y <= -1.8e-169) tmp = (t * x) / (z - y); elseif (y <= 2.15e-72) tmp = (t * (x - y)) / z; elseif (y <= 2.3e+25) tmp = t * (x / (z - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e+39], t$95$1, If[LessEqual[y, -1.8e-169], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e-72], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.3e+25], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-169}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-72}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+25}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.30000000000000012e39 or 2.2999999999999998e25 < y Initial program 99.8%
Taylor expanded in x around 0 87.0%
neg-mul-187.0%
distribute-neg-frac87.0%
Simplified87.0%
if -2.30000000000000012e39 < y < -1.80000000000000001e-169Initial program 95.1%
associate-*l/99.8%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in x around inf 71.5%
if -1.80000000000000001e-169 < y < 2.1499999999999999e-72Initial program 90.5%
associate-*l/92.9%
associate-/l*88.7%
Simplified88.7%
Taylor expanded in z around inf 82.7%
if 2.1499999999999999e-72 < y < 2.2999999999999998e25Initial program 99.7%
Taylor expanded in x around inf 86.8%
Final simplification83.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -9.5e+34)
t
(if (<= y 3.4e-136)
(/ (* t x) z)
(if (<= y 2.15e+27) (* x (/ t (- y))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e+34) {
tmp = t;
} else if (y <= 3.4e-136) {
tmp = (t * x) / z;
} else if (y <= 2.15e+27) {
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 <= (-9.5d+34)) then
tmp = t
else if (y <= 3.4d-136) then
tmp = (t * x) / z
else if (y <= 2.15d+27) 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 <= -9.5e+34) {
tmp = t;
} else if (y <= 3.4e-136) {
tmp = (t * x) / z;
} else if (y <= 2.15e+27) {
tmp = x * (t / -y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.5e+34: tmp = t elif y <= 3.4e-136: tmp = (t * x) / z elif y <= 2.15e+27: tmp = x * (t / -y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.5e+34) tmp = t; elseif (y <= 3.4e-136) tmp = Float64(Float64(t * x) / z); elseif (y <= 2.15e+27) tmp = Float64(x * Float64(t / Float64(-y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.5e+34) tmp = t; elseif (y <= 3.4e-136) tmp = (t * x) / z; elseif (y <= 2.15e+27) tmp = x * (t / -y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.5e+34], t, If[LessEqual[y, 3.4e-136], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.15e+27], N[(x * N[(t / (-y)), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+34}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-136}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \frac{t}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -9.4999999999999999e34 or 2.15000000000000004e27 < y Initial program 99.8%
associate-*l/70.5%
associate-/l*81.4%
Simplified81.4%
Taylor expanded in y around inf 71.2%
if -9.4999999999999999e34 < y < 3.4e-136Initial program 90.9%
associate-*l/95.5%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in y around 0 65.3%
if 3.4e-136 < y < 2.15000000000000004e27Initial program 99.7%
Taylor expanded in x around inf 76.9%
Taylor expanded in z around 0 58.2%
associate-*r/58.2%
associate-*r*58.2%
neg-mul-158.2%
*-commutative58.2%
associate-/l*58.1%
Simplified58.1%
Final simplification67.2%
(FPCore (x y z t) :precision binary64 (if (<= y -2.4e+36) t (if (<= y 1.4e-135) (/ (* t x) z) (if (<= y 1.3e+25) (* t (/ x (- y))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e+36) {
tmp = t;
} else if (y <= 1.4e-135) {
tmp = (t * x) / z;
} else if (y <= 1.3e+25) {
tmp = t * (x / -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.4d+36)) then
tmp = t
else if (y <= 1.4d-135) then
tmp = (t * x) / z
else if (y <= 1.3d+25) then
tmp = t * (x / -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.4e+36) {
tmp = t;
} else if (y <= 1.4e-135) {
tmp = (t * x) / z;
} else if (y <= 1.3e+25) {
tmp = t * (x / -y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.4e+36: tmp = t elif y <= 1.4e-135: tmp = (t * x) / z elif y <= 1.3e+25: tmp = t * (x / -y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.4e+36) tmp = t; elseif (y <= 1.4e-135) tmp = Float64(Float64(t * x) / z); elseif (y <= 1.3e+25) tmp = Float64(t * Float64(x / Float64(-y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.4e+36) tmp = t; elseif (y <= 1.4e-135) tmp = (t * x) / z; elseif (y <= 1.3e+25) tmp = t * (x / -y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e+36], t, If[LessEqual[y, 1.4e-135], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.3e+25], N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-135}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+25}:\\
\;\;\;\;t \cdot \frac{x}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.39999999999999992e36 or 1.2999999999999999e25 < y Initial program 99.8%
associate-*l/70.5%
associate-/l*81.4%
Simplified81.4%
Taylor expanded in y around inf 71.2%
if -2.39999999999999992e36 < y < 1.40000000000000012e-135Initial program 90.9%
associate-*l/95.5%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in y around 0 65.3%
if 1.40000000000000012e-135 < y < 1.2999999999999999e25Initial program 99.7%
Taylor expanded in x around inf 76.9%
Taylor expanded in z around 0 58.1%
associate-*r/58.1%
neg-mul-158.1%
Simplified58.1%
Final simplification67.2%
(FPCore (x y z t) :precision binary64 (if (<= y -2e+31) t (if (<= y 1.4e-135) (/ (* t x) z) (if (<= y 1.1e+35) (/ (* x (- t)) y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e+31) {
tmp = t;
} else if (y <= 1.4e-135) {
tmp = (t * x) / z;
} else if (y <= 1.1e+35) {
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 <= (-2d+31)) then
tmp = t
else if (y <= 1.4d-135) then
tmp = (t * x) / z
else if (y <= 1.1d+35) 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 <= -2e+31) {
tmp = t;
} else if (y <= 1.4e-135) {
tmp = (t * x) / z;
} else if (y <= 1.1e+35) {
tmp = (x * -t) / y;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2e+31: tmp = t elif y <= 1.4e-135: tmp = (t * x) / z elif y <= 1.1e+35: tmp = (x * -t) / y else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2e+31) tmp = t; elseif (y <= 1.4e-135) tmp = Float64(Float64(t * x) / z); elseif (y <= 1.1e+35) tmp = Float64(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 <= -2e+31) tmp = t; elseif (y <= 1.4e-135) tmp = (t * x) / z; elseif (y <= 1.1e+35) tmp = (x * -t) / y; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2e+31], t, If[LessEqual[y, 1.4e-135], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.1e+35], N[(N[(x * (-t)), $MachinePrecision] / y), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+31}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-135}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+35}:\\
\;\;\;\;\frac{x \cdot \left(-t\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.9999999999999999e31 or 1.0999999999999999e35 < y Initial program 99.8%
associate-*l/70.5%
associate-/l*81.4%
Simplified81.4%
Taylor expanded in y around inf 71.2%
if -1.9999999999999999e31 < y < 1.40000000000000012e-135Initial program 90.9%
associate-*l/95.5%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in y around 0 65.3%
if 1.40000000000000012e-135 < y < 1.0999999999999999e35Initial program 99.7%
Taylor expanded in x around inf 76.9%
Taylor expanded in z around 0 58.2%
associate-*r/58.2%
associate-*r*58.2%
neg-mul-158.2%
*-commutative58.2%
Simplified58.2%
Final simplification67.2%
(FPCore (x y z t) :precision binary64 (if (<= y -5.8e+71) t (if (<= y 6.4e+69) (* (- x y) (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e+71) {
tmp = t;
} else if (y <= 6.4e+69) {
tmp = (x - 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 <= (-5.8d+71)) then
tmp = t
else if (y <= 6.4d+69) then
tmp = (x - 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 <= -5.8e+71) {
tmp = t;
} else if (y <= 6.4e+69) {
tmp = (x - y) * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.8e+71: tmp = t elif y <= 6.4e+69: tmp = (x - y) * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.8e+71) tmp = t; elseif (y <= 6.4e+69) tmp = Float64(Float64(x - y) * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.8e+71) tmp = t; elseif (y <= 6.4e+69) tmp = (x - y) * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.8e+71], t, If[LessEqual[y, 6.4e+69], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+71}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+69}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.80000000000000014e71 or 6.3999999999999997e69 < y Initial program 99.8%
associate-*l/66.7%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in y around inf 75.4%
if -5.80000000000000014e71 < y < 6.3999999999999997e69Initial program 93.5%
associate-*l/94.9%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in z around inf 63.9%
Final simplification68.6%
(FPCore (x y z t) :precision binary64 (if (<= y -8.2e+43) t (if (<= y 1.15e+47) (* t (/ x (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e+43) {
tmp = t;
} else if (y <= 1.15e+47) {
tmp = t * (x / (z - 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 <= (-8.2d+43)) then
tmp = t
else if (y <= 1.15d+47) then
tmp = t * (x / (z - 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 <= -8.2e+43) {
tmp = t;
} else if (y <= 1.15e+47) {
tmp = t * (x / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.2e+43: tmp = t elif y <= 1.15e+47: tmp = t * (x / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.2e+43) tmp = t; elseif (y <= 1.15e+47) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.2e+43) tmp = t; elseif (y <= 1.15e+47) tmp = t * (x / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.2e+43], t, If[LessEqual[y, 1.15e+47], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+43}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+47}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.2000000000000001e43 or 1.1499999999999999e47 < y Initial program 99.8%
associate-*l/69.8%
associate-/l*81.0%
Simplified81.0%
Taylor expanded in y around inf 72.1%
if -8.2000000000000001e43 < y < 1.1499999999999999e47Initial program 93.0%
Taylor expanded in x around inf 75.0%
Final simplification73.7%
(FPCore (x y z t) :precision binary64 (if (<= y -1.4e-99) t (if (<= y 8.5e-10) (* t (/ y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-99) {
tmp = t;
} else if (y <= 8.5e-10) {
tmp = t * (y / 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-99)) then
tmp = t
else if (y <= 8.5d-10) then
tmp = t * (y / 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-99) {
tmp = t;
} else if (y <= 8.5e-10) {
tmp = t * (y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e-99: tmp = t elif y <= 8.5e-10: tmp = t * (y / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e-99) tmp = t; elseif (y <= 8.5e-10) tmp = Float64(t * Float64(y / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.4e-99) tmp = t; elseif (y <= 8.5e-10) tmp = t * (y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e-99], t, If[LessEqual[y, 8.5e-10], N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-99}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-10}:\\
\;\;\;\;t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.4e-99 or 8.4999999999999996e-10 < y Initial program 99.8%
associate-*l/75.8%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in y around inf 62.5%
if -1.4e-99 < y < 8.4999999999999996e-10Initial program 90.9%
Taylor expanded in z around inf 73.3%
Taylor expanded in x around 0 26.6%
neg-mul-126.6%
distribute-neg-frac226.6%
Simplified26.6%
*-commutative26.6%
clear-num26.6%
un-div-inv26.6%
add-sqr-sqrt17.0%
sqrt-unprod26.0%
sqr-neg26.0%
sqrt-unprod6.9%
add-sqr-sqrt19.4%
Applied egg-rr19.4%
associate-/r/21.9%
associate-*l/19.4%
associate-/l*19.4%
Simplified19.4%
Final simplification44.5%
(FPCore (x y z t) :precision binary64 (if (<= y -2.5) t (if (<= y 3.2e+45) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5) {
tmp = t;
} else if (y <= 3.2e+45) {
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 <= (-2.5d0)) then
tmp = t
else if (y <= 3.2d+45) 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 <= -2.5) {
tmp = t;
} else if (y <= 3.2e+45) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.5: tmp = t elif y <= 3.2e+45: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.5) tmp = t; elseif (y <= 3.2e+45) 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 <= -2.5) tmp = t; elseif (y <= 3.2e+45) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.5], t, If[LessEqual[y, 3.2e+45], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+45}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.5 or 3.2000000000000003e45 < y Initial program 99.8%
associate-*l/72.2%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in y around inf 69.0%
if -2.5 < y < 3.2000000000000003e45Initial program 92.5%
associate-*l/94.1%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in y around 0 59.1%
*-commutative59.1%
associate-/l*57.9%
Simplified57.9%
Final simplification63.4%
(FPCore (x y z t) :precision binary64 (if (<= y -3.6e+32) t (if (<= y 5.4e+47) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.6e+32) {
tmp = t;
} else if (y <= 5.4e+47) {
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 <= (-3.6d+32)) then
tmp = t
else if (y <= 5.4d+47) 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 <= -3.6e+32) {
tmp = t;
} else if (y <= 5.4e+47) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.6e+32: tmp = t elif y <= 5.4e+47: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.6e+32) tmp = t; elseif (y <= 5.4e+47) 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 <= -3.6e+32) tmp = t; elseif (y <= 5.4e+47) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.6e+32], t, If[LessEqual[y, 5.4e+47], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+32}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+47}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.5999999999999997e32 or 5.39999999999999991e47 < y Initial program 99.8%
associate-*l/70.0%
associate-/l*81.1%
Simplified81.1%
Taylor expanded in y around inf 71.6%
if -3.5999999999999997e32 < y < 5.39999999999999991e47Initial program 93.0%
Taylor expanded in y around 0 58.7%
Final simplification64.6%
(FPCore (x y z t) :precision binary64 (* t (/ (- x y) (- z y))))
double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - 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 * ((x - y) / (z - y))
end function
public static double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - y));
}
def code(x, y, z, t): return t * ((x - y) / (z - y))
function code(x, y, z, t) return Float64(t * Float64(Float64(x - y) / Float64(z - y))) end
function tmp = code(x, y, z, t) tmp = t * ((x - y) / (z - y)); end
code[x_, y_, z_, t_] := N[(t * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x - y}{z - y}
\end{array}
Initial program 96.1%
Final simplification96.1%
(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.1%
associate-*l/83.3%
associate-/l*86.3%
Simplified86.3%
Taylor expanded in y around inf 39.2%
Final simplification39.2%
(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 2024039
(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))