
(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 97.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+206)
(* t (- 1.0 (/ x y)))
(if (<= y -3e+32)
(* t (/ y (- y z)))
(if (<= y 1.5e-251)
(/ (- x y) (/ z t))
(if (<= y 4.5e+46) (* t (/ x (- z y))) (/ t (/ (- y z) y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+206) {
tmp = t * (1.0 - (x / y));
} else if (y <= -3e+32) {
tmp = t * (y / (y - z));
} else if (y <= 1.5e-251) {
tmp = (x - y) / (z / t);
} else if (y <= 4.5e+46) {
tmp = t * (x / (z - y));
} else {
tmp = t / ((y - 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 (y <= (-1d+206)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= (-3d+32)) then
tmp = t * (y / (y - z))
else if (y <= 1.5d-251) then
tmp = (x - y) / (z / t)
else if (y <= 4.5d+46) then
tmp = t * (x / (z - y))
else
tmp = t / ((y - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+206) {
tmp = t * (1.0 - (x / y));
} else if (y <= -3e+32) {
tmp = t * (y / (y - z));
} else if (y <= 1.5e-251) {
tmp = (x - y) / (z / t);
} else if (y <= 4.5e+46) {
tmp = t * (x / (z - y));
} else {
tmp = t / ((y - z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+206: tmp = t * (1.0 - (x / y)) elif y <= -3e+32: tmp = t * (y / (y - z)) elif y <= 1.5e-251: tmp = (x - y) / (z / t) elif y <= 4.5e+46: tmp = t * (x / (z - y)) else: tmp = t / ((y - z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+206) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= -3e+32) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (y <= 1.5e-251) tmp = Float64(Float64(x - y) / Float64(z / t)); elseif (y <= 4.5e+46) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = Float64(t / Float64(Float64(y - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+206) tmp = t * (1.0 - (x / y)); elseif (y <= -3e+32) tmp = t * (y / (y - z)); elseif (y <= 1.5e-251) tmp = (x - y) / (z / t); elseif (y <= 4.5e+46) tmp = t * (x / (z - y)); else tmp = t / ((y - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+206], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3e+32], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-251], N[(N[(x - y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+46], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+206}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -3 \cdot 10^{+32}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-251}:\\
\;\;\;\;\frac{x - y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+46}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{y - z}{y}}\\
\end{array}
\end{array}
if y < -1e206Initial program 99.8%
associate-*l/57.8%
associate-/l*49.8%
Simplified49.8%
clear-num47.5%
un-div-inv47.6%
Applied egg-rr47.6%
Taylor expanded in z around 0 57.8%
associate-*r/57.8%
*-commutative57.8%
associate-*l*57.8%
*-commutative57.8%
neg-mul-157.8%
neg-sub057.8%
associate--r-57.8%
neg-sub057.8%
+-commutative57.8%
sub-neg57.8%
associate-/l*99.8%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
if -1e206 < y < -3e32Initial program 99.9%
Taylor expanded in x around 0 76.7%
neg-mul-176.7%
distribute-neg-frac276.7%
neg-sub076.7%
sub-neg76.7%
+-commutative76.7%
associate--r+76.7%
neg-sub076.7%
remove-double-neg76.7%
Simplified76.7%
if -3e32 < y < 1.4999999999999999e-251Initial program 92.3%
associate-*l/90.2%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 82.4%
clear-num82.4%
un-div-inv82.5%
Applied egg-rr82.5%
if 1.4999999999999999e-251 < y < 4.5000000000000001e46Initial program 97.9%
Taylor expanded in x around inf 77.0%
if 4.5000000000000001e46 < y Initial program 99.9%
associate-*l/70.3%
associate-/l*78.0%
Simplified78.0%
associate-*r/70.3%
associate-*l/99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 78.8%
neg-mul-178.8%
Simplified78.8%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -3.2e+207)
(* t (- 1.0 (/ x y)))
(if (<= y -2.2e+31)
t_1
(if (<= y 2.7e-254)
(/ (- x y) (/ z t))
(if (<= y 1.4e+44) (* 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 <= -3.2e+207) {
tmp = t * (1.0 - (x / y));
} else if (y <= -2.2e+31) {
tmp = t_1;
} else if (y <= 2.7e-254) {
tmp = (x - y) / (z / t);
} else if (y <= 1.4e+44) {
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 <= (-3.2d+207)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= (-2.2d+31)) then
tmp = t_1
else if (y <= 2.7d-254) then
tmp = (x - y) / (z / t)
else if (y <= 1.4d+44) 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 <= -3.2e+207) {
tmp = t * (1.0 - (x / y));
} else if (y <= -2.2e+31) {
tmp = t_1;
} else if (y <= 2.7e-254) {
tmp = (x - y) / (z / t);
} else if (y <= 1.4e+44) {
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 <= -3.2e+207: tmp = t * (1.0 - (x / y)) elif y <= -2.2e+31: tmp = t_1 elif y <= 2.7e-254: tmp = (x - y) / (z / t) elif y <= 1.4e+44: 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 <= -3.2e+207) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= -2.2e+31) tmp = t_1; elseif (y <= 2.7e-254) tmp = Float64(Float64(x - y) / Float64(z / t)); elseif (y <= 1.4e+44) 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 <= -3.2e+207) tmp = t * (1.0 - (x / y)); elseif (y <= -2.2e+31) tmp = t_1; elseif (y <= 2.7e-254) tmp = (x - y) / (z / t); elseif (y <= 1.4e+44) 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, -3.2e+207], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e+31], t$95$1, If[LessEqual[y, 2.7e-254], N[(N[(x - y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+44], 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 -3.2 \cdot 10^{+207}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-254}:\\
\;\;\;\;\frac{x - y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.2000000000000001e207Initial program 99.8%
associate-*l/57.8%
associate-/l*49.8%
Simplified49.8%
clear-num47.5%
un-div-inv47.6%
Applied egg-rr47.6%
Taylor expanded in z around 0 57.8%
associate-*r/57.8%
*-commutative57.8%
associate-*l*57.8%
*-commutative57.8%
neg-mul-157.8%
neg-sub057.8%
associate--r-57.8%
neg-sub057.8%
+-commutative57.8%
sub-neg57.8%
associate-/l*99.8%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
if -3.2000000000000001e207 < y < -2.2000000000000001e31 or 1.4e44 < y Initial program 99.9%
Taylor expanded in x around 0 77.9%
neg-mul-177.9%
distribute-neg-frac277.9%
neg-sub077.9%
sub-neg77.9%
+-commutative77.9%
associate--r+77.9%
neg-sub077.9%
remove-double-neg77.9%
Simplified77.9%
if -2.2000000000000001e31 < y < 2.70000000000000007e-254Initial program 92.3%
associate-*l/90.2%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 82.4%
clear-num82.4%
un-div-inv82.5%
Applied egg-rr82.5%
if 2.70000000000000007e-254 < y < 1.4e44Initial program 97.9%
Taylor expanded in x around inf 77.0%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -5.8e+207)
(* t (- 1.0 (/ x y)))
(if (<= y -2.2e+31)
t_1
(if (<= y 8.5e-253)
(* (- x y) (/ t z))
(if (<= y 9.5e+45) (* 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 <= -5.8e+207) {
tmp = t * (1.0 - (x / y));
} else if (y <= -2.2e+31) {
tmp = t_1;
} else if (y <= 8.5e-253) {
tmp = (x - y) * (t / z);
} else if (y <= 9.5e+45) {
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 <= (-5.8d+207)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= (-2.2d+31)) then
tmp = t_1
else if (y <= 8.5d-253) then
tmp = (x - y) * (t / z)
else if (y <= 9.5d+45) 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 <= -5.8e+207) {
tmp = t * (1.0 - (x / y));
} else if (y <= -2.2e+31) {
tmp = t_1;
} else if (y <= 8.5e-253) {
tmp = (x - y) * (t / z);
} else if (y <= 9.5e+45) {
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 <= -5.8e+207: tmp = t * (1.0 - (x / y)) elif y <= -2.2e+31: tmp = t_1 elif y <= 8.5e-253: tmp = (x - y) * (t / z) elif y <= 9.5e+45: 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 <= -5.8e+207) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= -2.2e+31) tmp = t_1; elseif (y <= 8.5e-253) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 9.5e+45) 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 <= -5.8e+207) tmp = t * (1.0 - (x / y)); elseif (y <= -2.2e+31) tmp = t_1; elseif (y <= 8.5e-253) tmp = (x - y) * (t / z); elseif (y <= 9.5e+45) 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, -5.8e+207], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e+31], t$95$1, If[LessEqual[y, 8.5e-253], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+45], 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 -5.8 \cdot 10^{+207}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-253}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+45}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.79999999999999994e207Initial program 99.8%
associate-*l/57.8%
associate-/l*49.8%
Simplified49.8%
clear-num47.5%
un-div-inv47.6%
Applied egg-rr47.6%
Taylor expanded in z around 0 57.8%
associate-*r/57.8%
*-commutative57.8%
associate-*l*57.8%
*-commutative57.8%
neg-mul-157.8%
neg-sub057.8%
associate--r-57.8%
neg-sub057.8%
+-commutative57.8%
sub-neg57.8%
associate-/l*99.8%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
if -5.79999999999999994e207 < y < -2.2000000000000001e31 or 9.4999999999999998e45 < y Initial program 99.9%
Taylor expanded in x around 0 77.9%
neg-mul-177.9%
distribute-neg-frac277.9%
neg-sub077.9%
sub-neg77.9%
+-commutative77.9%
associate--r+77.9%
neg-sub077.9%
remove-double-neg77.9%
Simplified77.9%
if -2.2000000000000001e31 < y < 8.4999999999999999e-253Initial program 92.3%
associate-*l/90.2%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 82.4%
if 8.4999999999999999e-253 < y < 9.4999999999999998e45Initial program 97.9%
Taylor expanded in x around inf 77.0%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -7e+44)
t_1
(if (<= y 1.65e-254)
(* (- x y) (/ t z))
(if (<= y 0.0035) (* t (/ x (- z y))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -7e+44) {
tmp = t_1;
} else if (y <= 1.65e-254) {
tmp = (x - y) * (t / z);
} else if (y <= 0.0035) {
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 * (1.0d0 - (x / y))
if (y <= (-7d+44)) then
tmp = t_1
else if (y <= 1.65d-254) then
tmp = (x - y) * (t / z)
else if (y <= 0.0035d0) 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 * (1.0 - (x / y));
double tmp;
if (y <= -7e+44) {
tmp = t_1;
} else if (y <= 1.65e-254) {
tmp = (x - y) * (t / z);
} else if (y <= 0.0035) {
tmp = t * (x / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -7e+44: tmp = t_1 elif y <= 1.65e-254: tmp = (x - y) * (t / z) elif y <= 0.0035: tmp = t * (x / (z - y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -7e+44) tmp = t_1; elseif (y <= 1.65e-254) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 0.0035) 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 * (1.0 - (x / y)); tmp = 0.0; if (y <= -7e+44) tmp = t_1; elseif (y <= 1.65e-254) tmp = (x - y) * (t / z); elseif (y <= 0.0035) 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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+44], t$95$1, If[LessEqual[y, 1.65e-254], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0035], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -7 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-254}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 0.0035:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.9999999999999998e44 or 0.00350000000000000007 < y Initial program 99.9%
associate-*l/73.4%
associate-/l*73.8%
Simplified73.8%
clear-num72.7%
un-div-inv72.9%
Applied egg-rr72.9%
Taylor expanded in z around 0 56.4%
associate-*r/56.4%
*-commutative56.4%
associate-*l*56.4%
*-commutative56.4%
neg-mul-156.4%
neg-sub056.4%
associate--r-56.4%
neg-sub056.4%
+-commutative56.4%
sub-neg56.4%
associate-/l*75.4%
div-sub75.4%
*-inverses75.4%
Simplified75.4%
if -6.9999999999999998e44 < y < 1.65000000000000008e-254Initial program 92.6%
associate-*l/90.7%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in z around inf 81.0%
if 1.65000000000000008e-254 < y < 0.00350000000000000007Initial program 97.6%
Taylor expanded in x around inf 79.8%
Final simplification78.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -4.8e+44)
t_1
(if (<= y -2e-283)
(* (- x y) (/ t z))
(if (<= y 0.00105) (* x (/ t (- z y))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -4.8e+44) {
tmp = t_1;
} else if (y <= -2e-283) {
tmp = (x - y) * (t / z);
} else if (y <= 0.00105) {
tmp = x * (t / (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 * (1.0d0 - (x / y))
if (y <= (-4.8d+44)) then
tmp = t_1
else if (y <= (-2d-283)) then
tmp = (x - y) * (t / z)
else if (y <= 0.00105d0) then
tmp = x * (t / (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 * (1.0 - (x / y));
double tmp;
if (y <= -4.8e+44) {
tmp = t_1;
} else if (y <= -2e-283) {
tmp = (x - y) * (t / z);
} else if (y <= 0.00105) {
tmp = x * (t / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -4.8e+44: tmp = t_1 elif y <= -2e-283: tmp = (x - y) * (t / z) elif y <= 0.00105: tmp = x * (t / (z - y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -4.8e+44) tmp = t_1; elseif (y <= -2e-283) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 0.00105) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -4.8e+44) tmp = t_1; elseif (y <= -2e-283) tmp = (x - y) * (t / z); elseif (y <= 0.00105) tmp = x * (t / (z - y)); 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]}, If[LessEqual[y, -4.8e+44], t$95$1, If[LessEqual[y, -2e-283], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00105], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-283}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 0.00105:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.80000000000000026e44 or 0.00104999999999999994 < y Initial program 99.9%
associate-*l/73.4%
associate-/l*73.8%
Simplified73.8%
clear-num72.7%
un-div-inv72.9%
Applied egg-rr72.9%
Taylor expanded in z around 0 56.4%
associate-*r/56.4%
*-commutative56.4%
associate-*l*56.4%
*-commutative56.4%
neg-mul-156.4%
neg-sub056.4%
associate--r-56.4%
neg-sub056.4%
+-commutative56.4%
sub-neg56.4%
associate-/l*75.4%
div-sub75.4%
*-inverses75.4%
Simplified75.4%
if -4.80000000000000026e44 < y < -1.99999999999999989e-283Initial program 92.8%
associate-*l/92.6%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in z around inf 77.9%
if -1.99999999999999989e-283 < y < 0.00104999999999999994Initial program 96.1%
associate-*l/89.3%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in x around inf 80.4%
(FPCore (x y z t) :precision binary64 (if (<= y -9e+169) (* t (- 1.0 (/ x y))) (if (<= y 8.8e+147) (* (- x y) (/ t (- z y))) (/ t (/ (- y z) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9e+169) {
tmp = t * (1.0 - (x / y));
} else if (y <= 8.8e+147) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t / ((y - 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 (y <= (-9d+169)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= 8.8d+147) then
tmp = (x - y) * (t / (z - y))
else
tmp = t / ((y - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9e+169) {
tmp = t * (1.0 - (x / y));
} else if (y <= 8.8e+147) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t / ((y - z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9e+169: tmp = t * (1.0 - (x / y)) elif y <= 8.8e+147: tmp = (x - y) * (t / (z - y)) else: tmp = t / ((y - z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9e+169) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= 8.8e+147) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = Float64(t / Float64(Float64(y - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9e+169) tmp = t * (1.0 - (x / y)); elseif (y <= 8.8e+147) tmp = (x - y) * (t / (z - y)); else tmp = t / ((y - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9e+169], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.8e+147], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+169}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+147}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{y - z}{y}}\\
\end{array}
\end{array}
if y < -8.9999999999999999e169Initial program 99.9%
associate-*l/67.6%
associate-/l*51.6%
Simplified51.6%
clear-num49.9%
un-div-inv50.1%
Applied egg-rr50.1%
Taylor expanded in z around 0 56.3%
associate-*r/56.3%
*-commutative56.3%
associate-*l*56.3%
*-commutative56.3%
neg-mul-156.3%
neg-sub056.3%
associate--r-56.3%
neg-sub056.3%
+-commutative56.3%
sub-neg56.3%
associate-/l*88.5%
div-sub88.6%
*-inverses88.6%
Simplified88.6%
if -8.9999999999999999e169 < y < 8.8000000000000007e147Initial program 96.1%
associate-*l/87.5%
associate-/l*91.2%
Simplified91.2%
if 8.8000000000000007e147 < y Initial program 99.9%
associate-*l/65.9%
associate-/l*71.1%
Simplified71.1%
associate-*r/65.9%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 97.2%
neg-mul-197.2%
Simplified97.2%
Final simplification91.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.5e+31) (not (<= y 0.0039))) (* t (- 1.0 (/ x y))) (* x (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.5e+31) || !(y <= 0.0039)) {
tmp = t * (1.0 - (x / y));
} 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 ((y <= (-6.5d+31)) .or. (.not. (y <= 0.0039d0))) then
tmp = t * (1.0d0 - (x / y))
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 ((y <= -6.5e+31) || !(y <= 0.0039)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = x * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.5e+31) or not (y <= 0.0039): tmp = t * (1.0 - (x / y)) else: tmp = x * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.5e+31) || !(y <= 0.0039)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); 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 ((y <= -6.5e+31) || ~((y <= 0.0039))) tmp = t * (1.0 - (x / y)); else tmp = x * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.5e+31], N[Not[LessEqual[y, 0.0039]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+31} \lor \neg \left(y \leq 0.0039\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -6.5000000000000004e31 or 0.0038999999999999998 < y Initial program 99.9%
associate-*l/74.2%
associate-/l*74.6%
Simplified74.6%
clear-num73.6%
un-div-inv73.8%
Applied egg-rr73.8%
Taylor expanded in z around 0 56.2%
associate-*r/56.2%
*-commutative56.2%
associate-*l*56.2%
*-commutative56.2%
neg-mul-156.2%
neg-sub056.2%
associate--r-56.2%
neg-sub056.2%
+-commutative56.2%
sub-neg56.2%
associate-/l*74.6%
div-sub74.6%
*-inverses74.6%
Simplified74.6%
if -6.5000000000000004e31 < y < 0.0038999999999999998Initial program 94.2%
associate-*l/90.8%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in x around inf 75.7%
Final simplification75.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.1e-38) (not (<= y 2.2e+26))) (* t (- 1.0 (/ x y))) (/ t (/ z x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.1e-38) || !(y <= 2.2e+26)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t / (z / 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 <= (-2.1d-38)) .or. (.not. (y <= 2.2d+26))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = t / (z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.1e-38) || !(y <= 2.2e+26)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t / (z / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.1e-38) or not (y <= 2.2e+26): tmp = t * (1.0 - (x / y)) else: tmp = t / (z / x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.1e-38) || !(y <= 2.2e+26)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(t / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.1e-38) || ~((y <= 2.2e+26))) tmp = t * (1.0 - (x / y)); else tmp = t / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.1e-38], N[Not[LessEqual[y, 2.2e+26]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-38} \lor \neg \left(y \leq 2.2 \cdot 10^{+26}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\end{array}
\end{array}
if y < -2.10000000000000013e-38 or 2.20000000000000007e26 < y Initial program 99.9%
associate-*l/75.0%
associate-/l*76.1%
Simplified76.1%
clear-num75.1%
un-div-inv75.3%
Applied egg-rr75.3%
Taylor expanded in z around 0 56.1%
associate-*r/56.1%
*-commutative56.1%
associate-*l*56.1%
*-commutative56.1%
neg-mul-156.1%
neg-sub056.1%
associate--r-56.1%
neg-sub056.1%
+-commutative56.1%
sub-neg56.1%
associate-/l*74.0%
div-sub74.0%
*-inverses74.0%
Simplified74.0%
if -2.10000000000000013e-38 < y < 2.20000000000000007e26Initial program 94.0%
associate-*l/90.5%
associate-/l*92.7%
Simplified92.7%
associate-*r/90.5%
associate-*l/94.0%
*-commutative94.0%
clear-num94.0%
un-div-inv94.0%
Applied egg-rr94.0%
Taylor expanded in y around 0 66.1%
Final simplification70.1%
(FPCore (x y z t) :precision binary64 (if (<= y -3.1e+31) t (if (<= y 6.8e+31) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.1e+31) {
tmp = t;
} else if (y <= 6.8e+31) {
tmp = t / (z / x);
} 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.1d+31)) then
tmp = t
else if (y <= 6.8d+31) then
tmp = t / (z / x)
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.1e+31) {
tmp = t;
} else if (y <= 6.8e+31) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.1e+31: tmp = t elif y <= 6.8e+31: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.1e+31) tmp = t; elseif (y <= 6.8e+31) tmp = Float64(t / Float64(z / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.1e+31) tmp = t; elseif (y <= 6.8e+31) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.1e+31], t, If[LessEqual[y, 6.8e+31], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+31}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+31}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.1000000000000002e31 or 6.7999999999999996e31 < y Initial program 99.9%
associate-*l/73.4%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in y around inf 60.3%
if -3.1000000000000002e31 < y < 6.7999999999999996e31Initial program 94.4%
associate-*l/91.0%
associate-/l*93.1%
Simplified93.1%
associate-*r/91.0%
associate-*l/94.4%
*-commutative94.4%
clear-num94.3%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in y around 0 65.2%
(FPCore (x y z t) :precision binary64 (if (<= y -3.3e+31) t (if (<= y 1.06e+32) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e+31) {
tmp = t;
} else if (y <= 1.06e+32) {
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.3d+31)) then
tmp = t
else if (y <= 1.06d+32) 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.3e+31) {
tmp = t;
} else if (y <= 1.06e+32) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.3e+31: tmp = t elif y <= 1.06e+32: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.3e+31) tmp = t; elseif (y <= 1.06e+32) 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.3e+31) tmp = t; elseif (y <= 1.06e+32) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.3e+31], t, If[LessEqual[y, 1.06e+32], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+31}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+32}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.29999999999999992e31 or 1.0600000000000001e32 < y Initial program 99.9%
associate-*l/73.4%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in y around inf 60.3%
if -3.29999999999999992e31 < y < 1.0600000000000001e32Initial program 94.4%
Taylor expanded in y around 0 65.2%
Final simplification62.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.55e+32) t (if (<= y 0.0026) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.55e+32) {
tmp = t;
} else if (y <= 0.0026) {
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 <= (-1.55d+32)) then
tmp = t
else if (y <= 0.0026d0) 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 <= -1.55e+32) {
tmp = t;
} else if (y <= 0.0026) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.55e+32: tmp = t elif y <= 0.0026: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.55e+32) tmp = t; elseif (y <= 0.0026) 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 <= -1.55e+32) tmp = t; elseif (y <= 0.0026) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.55e+32], t, If[LessEqual[y, 0.0026], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.0026:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.54999999999999997e32 or 0.0025999999999999999 < y Initial program 99.9%
associate-*l/74.2%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in y around inf 60.1%
if -1.54999999999999997e32 < y < 0.0025999999999999999Initial program 94.2%
associate-*l/90.8%
associate-/l*93.6%
Simplified93.6%
clear-num93.6%
un-div-inv94.1%
Applied egg-rr94.1%
Taylor expanded in y around 0 60.6%
associate-*l/64.9%
*-commutative64.9%
Simplified64.9%
(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 97.0%
associate-*l/82.5%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in y around inf 35.1%
(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 2024111
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))