
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
(FPCore (x y z t) :precision binary64 (* x (/ (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
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) / (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
def code(x, y, z, t): return x * ((y - z) / (t - z))
function code(x, y, z, t) return Float64(x * Float64(Float64(y - z) / Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x * ((y - z) / (t - z)); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y - z}{t - z}
\end{array}
Initial program 88.8%
associate-/l*98.6%
Simplified98.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t y))))
(if (<= z -4e+58)
x
(if (<= z -1.35e+26)
t_1
(if (<= z -2e-28)
x
(if (<= z 5.5e-14) t_1 (if (<= z 1.26e+117) (/ x (/ t (- z))) x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / y);
double tmp;
if (z <= -4e+58) {
tmp = x;
} else if (z <= -1.35e+26) {
tmp = t_1;
} else if (z <= -2e-28) {
tmp = x;
} else if (z <= 5.5e-14) {
tmp = t_1;
} else if (z <= 1.26e+117) {
tmp = x / (t / -z);
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x / (t / y)
if (z <= (-4d+58)) then
tmp = x
else if (z <= (-1.35d+26)) then
tmp = t_1
else if (z <= (-2d-28)) then
tmp = x
else if (z <= 5.5d-14) then
tmp = t_1
else if (z <= 1.26d+117) then
tmp = x / (t / -z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (t / y);
double tmp;
if (z <= -4e+58) {
tmp = x;
} else if (z <= -1.35e+26) {
tmp = t_1;
} else if (z <= -2e-28) {
tmp = x;
} else if (z <= 5.5e-14) {
tmp = t_1;
} else if (z <= 1.26e+117) {
tmp = x / (t / -z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / y) tmp = 0 if z <= -4e+58: tmp = x elif z <= -1.35e+26: tmp = t_1 elif z <= -2e-28: tmp = x elif z <= 5.5e-14: tmp = t_1 elif z <= 1.26e+117: tmp = x / (t / -z) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / y)) tmp = 0.0 if (z <= -4e+58) tmp = x; elseif (z <= -1.35e+26) tmp = t_1; elseif (z <= -2e-28) tmp = x; elseif (z <= 5.5e-14) tmp = t_1; elseif (z <= 1.26e+117) tmp = Float64(x / Float64(t / Float64(-z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / y); tmp = 0.0; if (z <= -4e+58) tmp = x; elseif (z <= -1.35e+26) tmp = t_1; elseif (z <= -2e-28) tmp = x; elseif (z <= 5.5e-14) tmp = t_1; elseif (z <= 1.26e+117) tmp = x / (t / -z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+58], x, If[LessEqual[z, -1.35e+26], t$95$1, If[LessEqual[z, -2e-28], x, If[LessEqual[z, 5.5e-14], t$95$1, If[LessEqual[z, 1.26e+117], N[(x / N[(t / (-z)), $MachinePrecision]), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{+117}:\\
\;\;\;\;\frac{x}{\frac{t}{-z}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.99999999999999978e58 or -1.35e26 < z < -1.99999999999999994e-28 or 1.25999999999999993e117 < z Initial program 80.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.4%
if -3.99999999999999978e58 < z < -1.35e26 or -1.99999999999999994e-28 < z < 5.49999999999999991e-14Initial program 93.6%
associate-/l*97.3%
Simplified97.3%
clear-num96.6%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in z around 0 66.8%
if 5.49999999999999991e-14 < z < 1.25999999999999993e117Initial program 94.2%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in t around inf 56.7%
Taylor expanded in y around 0 49.2%
associate-*r/49.2%
neg-mul-149.2%
Simplified49.2%
Final simplification67.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t y))))
(if (<= z -4e+58)
x
(if (<= z -7.6e+25)
t_1
(if (<= z -6.3e-28)
x
(if (<= z 2.2e-14) t_1 (if (<= z 2.35e+118) (* x (/ z (- t))) x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / y);
double tmp;
if (z <= -4e+58) {
tmp = x;
} else if (z <= -7.6e+25) {
tmp = t_1;
} else if (z <= -6.3e-28) {
tmp = x;
} else if (z <= 2.2e-14) {
tmp = t_1;
} else if (z <= 2.35e+118) {
tmp = x * (z / -t);
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x / (t / y)
if (z <= (-4d+58)) then
tmp = x
else if (z <= (-7.6d+25)) then
tmp = t_1
else if (z <= (-6.3d-28)) then
tmp = x
else if (z <= 2.2d-14) then
tmp = t_1
else if (z <= 2.35d+118) then
tmp = x * (z / -t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (t / y);
double tmp;
if (z <= -4e+58) {
tmp = x;
} else if (z <= -7.6e+25) {
tmp = t_1;
} else if (z <= -6.3e-28) {
tmp = x;
} else if (z <= 2.2e-14) {
tmp = t_1;
} else if (z <= 2.35e+118) {
tmp = x * (z / -t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / y) tmp = 0 if z <= -4e+58: tmp = x elif z <= -7.6e+25: tmp = t_1 elif z <= -6.3e-28: tmp = x elif z <= 2.2e-14: tmp = t_1 elif z <= 2.35e+118: tmp = x * (z / -t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / y)) tmp = 0.0 if (z <= -4e+58) tmp = x; elseif (z <= -7.6e+25) tmp = t_1; elseif (z <= -6.3e-28) tmp = x; elseif (z <= 2.2e-14) tmp = t_1; elseif (z <= 2.35e+118) tmp = Float64(x * Float64(z / Float64(-t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / y); tmp = 0.0; if (z <= -4e+58) tmp = x; elseif (z <= -7.6e+25) tmp = t_1; elseif (z <= -6.3e-28) tmp = x; elseif (z <= 2.2e-14) tmp = t_1; elseif (z <= 2.35e+118) tmp = x * (z / -t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+58], x, If[LessEqual[z, -7.6e+25], t$95$1, If[LessEqual[z, -6.3e-28], x, If[LessEqual[z, 2.2e-14], t$95$1, If[LessEqual[z, 2.35e+118], N[(x * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.3 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \frac{z}{-t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.99999999999999978e58 or -7.6000000000000001e25 < z < -6.2999999999999997e-28 or 2.3499999999999999e118 < z Initial program 80.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.4%
if -3.99999999999999978e58 < z < -7.6000000000000001e25 or -6.2999999999999997e-28 < z < 2.2000000000000001e-14Initial program 93.6%
associate-/l*97.3%
Simplified97.3%
clear-num96.6%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in z around 0 66.8%
if 2.2000000000000001e-14 < z < 2.3499999999999999e118Initial program 94.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 53.9%
Taylor expanded in y around 0 49.1%
mul-1-neg49.1%
associate-/l*49.2%
distribute-rgt-neg-in49.2%
Simplified49.2%
Final simplification67.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t (- y z)))))
(if (<= t -7.2e+38)
t_1
(if (<= t 9.5e-53)
(* x (- 1.0 (/ y z)))
(if (or (<= t 2.1e+110) (not (<= t 4.6e+154)))
t_1
(* x (/ z (- z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / (y - z));
double tmp;
if (t <= -7.2e+38) {
tmp = t_1;
} else if (t <= 9.5e-53) {
tmp = x * (1.0 - (y / z));
} else if ((t <= 2.1e+110) || !(t <= 4.6e+154)) {
tmp = t_1;
} else {
tmp = x * (z / (z - 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 / (y - z))
if (t <= (-7.2d+38)) then
tmp = t_1
else if (t <= 9.5d-53) then
tmp = x * (1.0d0 - (y / z))
else if ((t <= 2.1d+110) .or. (.not. (t <= 4.6d+154))) then
tmp = t_1
else
tmp = x * (z / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (t / (y - z));
double tmp;
if (t <= -7.2e+38) {
tmp = t_1;
} else if (t <= 9.5e-53) {
tmp = x * (1.0 - (y / z));
} else if ((t <= 2.1e+110) || !(t <= 4.6e+154)) {
tmp = t_1;
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / (y - z)) tmp = 0 if t <= -7.2e+38: tmp = t_1 elif t <= 9.5e-53: tmp = x * (1.0 - (y / z)) elif (t <= 2.1e+110) or not (t <= 4.6e+154): tmp = t_1 else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / Float64(y - z))) tmp = 0.0 if (t <= -7.2e+38) tmp = t_1; elseif (t <= 9.5e-53) tmp = Float64(x * Float64(1.0 - Float64(y / z))); elseif ((t <= 2.1e+110) || !(t <= 4.6e+154)) tmp = t_1; else tmp = Float64(x * Float64(z / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / (y - z)); tmp = 0.0; if (t <= -7.2e+38) tmp = t_1; elseif (t <= 9.5e-53) tmp = x * (1.0 - (y / z)); elseif ((t <= 2.1e+110) || ~((t <= 4.6e+154))) tmp = t_1; else tmp = x * (z / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+38], t$95$1, If[LessEqual[t, 9.5e-53], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.1e+110], N[Not[LessEqual[t, 4.6e+154]], $MachinePrecision]], t$95$1, N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y - z}}\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-53}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+110} \lor \neg \left(t \leq 4.6 \cdot 10^{+154}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if t < -7.19999999999999938e38 or 9.5000000000000008e-53 < t < 2.10000000000000015e110 or 4.6e154 < t Initial program 87.2%
associate-/l*97.9%
Simplified97.9%
clear-num97.1%
un-div-inv97.2%
Applied egg-rr97.2%
Taylor expanded in t around inf 82.8%
if -7.19999999999999938e38 < t < 9.5000000000000008e-53Initial program 90.9%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t around 0 78.2%
mul-1-neg78.2%
associate-/l*85.8%
distribute-rgt-neg-in85.8%
distribute-frac-neg85.8%
neg-sub085.8%
associate--r-85.8%
neg-sub085.8%
+-commutative85.8%
sub-neg85.8%
div-sub85.8%
*-inverses85.8%
Simplified85.8%
if 2.10000000000000015e110 < t < 4.6e154Initial program 73.1%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 73.1%
mul-1-neg73.1%
distribute-neg-frac273.1%
neg-sub073.1%
associate--r-73.1%
neg-sub073.1%
+-commutative73.1%
sub-neg73.1%
associate-/l*100.0%
Simplified100.0%
Final simplification84.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t (- y z)))))
(if (<= t -5.5e+43)
t_1
(if (<= t -6e-39)
(* x (/ z (- z t)))
(if (<= t -6e-80)
(/ (* x (- y z)) t)
(if (<= t 4.2e-49) (* x (- 1.0 (/ y z))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / (y - z));
double tmp;
if (t <= -5.5e+43) {
tmp = t_1;
} else if (t <= -6e-39) {
tmp = x * (z / (z - t));
} else if (t <= -6e-80) {
tmp = (x * (y - z)) / t;
} else if (t <= 4.2e-49) {
tmp = x * (1.0 - (y / z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (t / (y - z))
if (t <= (-5.5d+43)) then
tmp = t_1
else if (t <= (-6d-39)) then
tmp = x * (z / (z - t))
else if (t <= (-6d-80)) then
tmp = (x * (y - z)) / t
else if (t <= 4.2d-49) then
tmp = x * (1.0d0 - (y / z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (t / (y - z));
double tmp;
if (t <= -5.5e+43) {
tmp = t_1;
} else if (t <= -6e-39) {
tmp = x * (z / (z - t));
} else if (t <= -6e-80) {
tmp = (x * (y - z)) / t;
} else if (t <= 4.2e-49) {
tmp = x * (1.0 - (y / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / (y - z)) tmp = 0 if t <= -5.5e+43: tmp = t_1 elif t <= -6e-39: tmp = x * (z / (z - t)) elif t <= -6e-80: tmp = (x * (y - z)) / t elif t <= 4.2e-49: tmp = x * (1.0 - (y / z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / Float64(y - z))) tmp = 0.0 if (t <= -5.5e+43) tmp = t_1; elseif (t <= -6e-39) tmp = Float64(x * Float64(z / Float64(z - t))); elseif (t <= -6e-80) tmp = Float64(Float64(x * Float64(y - z)) / t); elseif (t <= 4.2e-49) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / (y - z)); tmp = 0.0; if (t <= -5.5e+43) tmp = t_1; elseif (t <= -6e-39) tmp = x * (z / (z - t)); elseif (t <= -6e-80) tmp = (x * (y - z)) / t; elseif (t <= 4.2e-49) tmp = x * (1.0 - (y / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+43], t$95$1, If[LessEqual[t, -6e-39], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e-80], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 4.2e-49], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y - z}}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-80}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.49999999999999989e43 or 4.1999999999999998e-49 < t Initial program 86.2%
associate-/l*98.0%
Simplified98.0%
clear-num97.2%
un-div-inv97.3%
Applied egg-rr97.3%
Taylor expanded in t around inf 80.1%
if -5.49999999999999989e43 < t < -6.00000000000000055e-39Initial program 89.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 74.5%
mul-1-neg74.5%
distribute-neg-frac274.5%
neg-sub074.5%
associate--r-74.5%
neg-sub074.5%
+-commutative74.5%
sub-neg74.5%
associate-/l*84.5%
Simplified84.5%
if -6.00000000000000055e-39 < t < -6.00000000000000014e-80Initial program 99.2%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in t around inf 87.8%
if -6.00000000000000014e-80 < t < 4.1999999999999998e-49Initial program 90.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 82.6%
mul-1-neg82.6%
associate-/l*91.0%
distribute-rgt-neg-in91.0%
distribute-frac-neg91.0%
neg-sub091.0%
associate--r-91.0%
neg-sub091.0%
+-commutative91.0%
sub-neg91.0%
div-sub91.0%
*-inverses91.0%
Simplified91.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -4e+59)
x
(if (or (<= z -1e+26) (and (not (<= z -9.5e-28)) (<= z 3.6e-15)))
(/ x (/ t y))
x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e+59) {
tmp = x;
} else if ((z <= -1e+26) || (!(z <= -9.5e-28) && (z <= 3.6e-15))) {
tmp = x / (t / y);
} else {
tmp = 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 (z <= (-4d+59)) then
tmp = x
else if ((z <= (-1d+26)) .or. (.not. (z <= (-9.5d-28))) .and. (z <= 3.6d-15)) then
tmp = x / (t / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e+59) {
tmp = x;
} else if ((z <= -1e+26) || (!(z <= -9.5e-28) && (z <= 3.6e-15))) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4e+59: tmp = x elif (z <= -1e+26) or (not (z <= -9.5e-28) and (z <= 3.6e-15)): tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4e+59) tmp = x; elseif ((z <= -1e+26) || (!(z <= -9.5e-28) && (z <= 3.6e-15))) tmp = Float64(x / Float64(t / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4e+59) tmp = x; elseif ((z <= -1e+26) || (~((z <= -9.5e-28)) && (z <= 3.6e-15))) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4e+59], x, If[Or[LessEqual[z, -1e+26], And[N[Not[LessEqual[z, -9.5e-28]], $MachinePrecision], LessEqual[z, 3.6e-15]]], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+59}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+26} \lor \neg \left(z \leq -9.5 \cdot 10^{-28}\right) \land z \leq 3.6 \cdot 10^{-15}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.99999999999999989e59 or -1.00000000000000005e26 < z < -9.50000000000000001e-28 or 3.6000000000000001e-15 < z Initial program 84.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.1%
if -3.99999999999999989e59 < z < -1.00000000000000005e26 or -9.50000000000000001e-28 < z < 3.6000000000000001e-15Initial program 93.6%
associate-/l*97.3%
Simplified97.3%
clear-num96.6%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in z around 0 67.3%
Final simplification64.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -4e+58)
x
(if (or (<= z -2.5e+25) (and (not (<= z -6e-28)) (<= z 1.66e-15)))
(* x (/ y t))
x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e+58) {
tmp = x;
} else if ((z <= -2.5e+25) || (!(z <= -6e-28) && (z <= 1.66e-15))) {
tmp = x * (y / t);
} else {
tmp = 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 (z <= (-4d+58)) then
tmp = x
else if ((z <= (-2.5d+25)) .or. (.not. (z <= (-6d-28))) .and. (z <= 1.66d-15)) then
tmp = x * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e+58) {
tmp = x;
} else if ((z <= -2.5e+25) || (!(z <= -6e-28) && (z <= 1.66e-15))) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4e+58: tmp = x elif (z <= -2.5e+25) or (not (z <= -6e-28) and (z <= 1.66e-15)): tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4e+58) tmp = x; elseif ((z <= -2.5e+25) || (!(z <= -6e-28) && (z <= 1.66e-15))) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4e+58) tmp = x; elseif ((z <= -2.5e+25) || (~((z <= -6e-28)) && (z <= 1.66e-15))) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4e+58], x, If[Or[LessEqual[z, -2.5e+25], And[N[Not[LessEqual[z, -6e-28]], $MachinePrecision], LessEqual[z, 1.66e-15]]], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+25} \lor \neg \left(z \leq -6 \cdot 10^{-28}\right) \land z \leq 1.66 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.99999999999999978e58 or -2.50000000000000012e25 < z < -6.00000000000000005e-28 or 1.65999999999999996e-15 < z Initial program 84.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.1%
if -3.99999999999999978e58 < z < -2.50000000000000012e25 or -6.00000000000000005e-28 < z < 1.65999999999999996e-15Initial program 93.6%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around 0 65.8%
associate-/l*67.2%
Simplified67.2%
Final simplification64.0%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.32e+185)
(/ x (/ t (- z)))
(if (<= t -1.6e+39)
(* x (/ y t))
(if (<= t 7.5e-49) (* x (- 1.0 (/ y z))) (/ x (/ t y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.32e+185) {
tmp = x / (t / -z);
} else if (t <= -1.6e+39) {
tmp = x * (y / t);
} else if (t <= 7.5e-49) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / 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 (t <= (-1.32d+185)) then
tmp = x / (t / -z)
else if (t <= (-1.6d+39)) then
tmp = x * (y / t)
else if (t <= 7.5d-49) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x / (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.32e+185) {
tmp = x / (t / -z);
} else if (t <= -1.6e+39) {
tmp = x * (y / t);
} else if (t <= 7.5e-49) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.32e+185: tmp = x / (t / -z) elif t <= -1.6e+39: tmp = x * (y / t) elif t <= 7.5e-49: tmp = x * (1.0 - (y / z)) else: tmp = x / (t / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.32e+185) tmp = Float64(x / Float64(t / Float64(-z))); elseif (t <= -1.6e+39) tmp = Float64(x * Float64(y / t)); elseif (t <= 7.5e-49) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x / Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.32e+185) tmp = x / (t / -z); elseif (t <= -1.6e+39) tmp = x * (y / t); elseif (t <= 7.5e-49) tmp = x * (1.0 - (y / z)); else tmp = x / (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.32e+185], N[(x / N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.6e+39], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-49], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.32 \cdot 10^{+185}:\\
\;\;\;\;\frac{x}{\frac{t}{-z}}\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -1.3199999999999999e185Initial program 91.9%
associate-/l*95.9%
Simplified95.9%
clear-num95.9%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in t around inf 80.9%
Taylor expanded in y around 0 58.2%
associate-*r/58.2%
neg-mul-158.2%
Simplified58.2%
if -1.3199999999999999e185 < t < -1.59999999999999996e39Initial program 88.2%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in z around 0 55.3%
associate-/l*57.5%
Simplified57.5%
if -1.59999999999999996e39 < t < 7.4999999999999998e-49Initial program 90.9%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t around 0 78.2%
mul-1-neg78.2%
associate-/l*85.8%
distribute-rgt-neg-in85.8%
distribute-frac-neg85.8%
neg-sub085.8%
associate--r-85.8%
neg-sub085.8%
+-commutative85.8%
sub-neg85.8%
div-sub85.8%
*-inverses85.8%
Simplified85.8%
if 7.4999999999999998e-49 < t Initial program 82.7%
associate-/l*98.0%
Simplified98.0%
clear-num97.9%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in z around 0 61.0%
Final simplification73.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.3e-27) (not (<= z 9.6e-17))) (/ x (- 1.0 (/ t z))) (* y (/ x (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.3e-27) || !(z <= 9.6e-17)) {
tmp = x / (1.0 - (t / z));
} else {
tmp = y * (x / (t - 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) :: tmp
if ((z <= (-1.3d-27)) .or. (.not. (z <= 9.6d-17))) then
tmp = x / (1.0d0 - (t / z))
else
tmp = y * (x / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.3e-27) || !(z <= 9.6e-17)) {
tmp = x / (1.0 - (t / z));
} else {
tmp = y * (x / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.3e-27) or not (z <= 9.6e-17): tmp = x / (1.0 - (t / z)) else: tmp = y * (x / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.3e-27) || !(z <= 9.6e-17)) tmp = Float64(x / Float64(1.0 - Float64(t / z))); else tmp = Float64(y * Float64(x / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.3e-27) || ~((z <= 9.6e-17))) tmp = x / (1.0 - (t / z)); else tmp = y * (x / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.3e-27], N[Not[LessEqual[z, 9.6e-17]], $MachinePrecision]], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-27} \lor \neg \left(z \leq 9.6 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\end{array}
\end{array}
if z < -1.30000000000000009e-27 or 9.59999999999999945e-17 < z Initial program 85.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 69.5%
mul-1-neg69.5%
distribute-neg-frac269.5%
neg-sub069.5%
associate--r-69.5%
neg-sub069.5%
+-commutative69.5%
sub-neg69.5%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in x around 0 69.5%
*-rgt-identity69.5%
times-frac56.5%
/-rgt-identity56.5%
associate-/r/81.8%
div-sub81.8%
*-inverses81.8%
Simplified81.8%
if -1.30000000000000009e-27 < z < 9.59999999999999945e-17Initial program 93.8%
associate-/l*97.1%
Simplified97.1%
clear-num96.3%
un-div-inv96.4%
Applied egg-rr96.4%
Taylor expanded in y around inf 78.9%
associate-*l/81.1%
*-commutative81.1%
Simplified81.1%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8e-29) (not (<= z 1.4e-15))) (* x (/ z (- z t))) (* y (/ x (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8e-29) || !(z <= 1.4e-15)) {
tmp = x * (z / (z - t));
} else {
tmp = y * (x / (t - 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) :: tmp
if ((z <= (-8d-29)) .or. (.not. (z <= 1.4d-15))) then
tmp = x * (z / (z - t))
else
tmp = y * (x / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8e-29) || !(z <= 1.4e-15)) {
tmp = x * (z / (z - t));
} else {
tmp = y * (x / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8e-29) or not (z <= 1.4e-15): tmp = x * (z / (z - t)) else: tmp = y * (x / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8e-29) || !(z <= 1.4e-15)) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = Float64(y * Float64(x / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8e-29) || ~((z <= 1.4e-15))) tmp = x * (z / (z - t)); else tmp = y * (x / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8e-29], N[Not[LessEqual[z, 1.4e-15]], $MachinePrecision]], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-29} \lor \neg \left(z \leq 1.4 \cdot 10^{-15}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\end{array}
\end{array}
if z < -7.99999999999999955e-29 or 1.40000000000000007e-15 < z Initial program 85.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 69.5%
mul-1-neg69.5%
distribute-neg-frac269.5%
neg-sub069.5%
associate--r-69.5%
neg-sub069.5%
+-commutative69.5%
sub-neg69.5%
associate-/l*81.8%
Simplified81.8%
if -7.99999999999999955e-29 < z < 1.40000000000000007e-15Initial program 93.8%
associate-/l*97.1%
Simplified97.1%
clear-num96.3%
un-div-inv96.4%
Applied egg-rr96.4%
Taylor expanded in y around inf 78.9%
associate-*l/81.1%
*-commutative81.1%
Simplified81.1%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -7.7e-28) (not (<= z 2.7e-15))) (* x (/ z (- z t))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.7e-28) || !(z <= 2.7e-15)) {
tmp = x * (z / (z - t));
} else {
tmp = x * (y / (t - 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) :: tmp
if ((z <= (-7.7d-28)) .or. (.not. (z <= 2.7d-15))) then
tmp = x * (z / (z - t))
else
tmp = x * (y / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.7e-28) || !(z <= 2.7e-15)) {
tmp = x * (z / (z - t));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -7.7e-28) or not (z <= 2.7e-15): tmp = x * (z / (z - t)) else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -7.7e-28) || !(z <= 2.7e-15)) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = Float64(x * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -7.7e-28) || ~((z <= 2.7e-15))) tmp = x * (z / (z - t)); else tmp = x * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -7.7e-28], N[Not[LessEqual[z, 2.7e-15]], $MachinePrecision]], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.7 \cdot 10^{-28} \lor \neg \left(z \leq 2.7 \cdot 10^{-15}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -7.7000000000000001e-28 or 2.70000000000000009e-15 < z Initial program 85.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 69.5%
mul-1-neg69.5%
distribute-neg-frac269.5%
neg-sub069.5%
associate--r-69.5%
neg-sub069.5%
+-commutative69.5%
sub-neg69.5%
associate-/l*81.8%
Simplified81.8%
if -7.7000000000000001e-28 < z < 2.70000000000000009e-15Initial program 93.8%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in y around inf 78.9%
associate-/l*80.5%
Simplified80.5%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8.2e-28) (not (<= z 8.4e-16))) (* x (- 1.0 (/ y z))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.2e-28) || !(z <= 8.4e-16)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / (t - 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) :: tmp
if ((z <= (-8.2d-28)) .or. (.not. (z <= 8.4d-16))) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x * (y / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.2e-28) || !(z <= 8.4e-16)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8.2e-28) or not (z <= 8.4e-16): tmp = x * (1.0 - (y / z)) else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8.2e-28) || !(z <= 8.4e-16)) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8.2e-28) || ~((z <= 8.4e-16))) tmp = x * (1.0 - (y / z)); else tmp = x * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.2e-28], N[Not[LessEqual[z, 8.4e-16]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-28} \lor \neg \left(z \leq 8.4 \cdot 10^{-16}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -8.2000000000000005e-28 or 8.4000000000000004e-16 < z Initial program 85.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 60.3%
mul-1-neg60.3%
associate-/l*70.7%
distribute-rgt-neg-in70.7%
distribute-frac-neg70.7%
neg-sub070.7%
associate--r-70.7%
neg-sub070.7%
+-commutative70.7%
sub-neg70.7%
div-sub70.7%
*-inverses70.7%
Simplified70.7%
if -8.2000000000000005e-28 < z < 8.4000000000000004e-16Initial program 93.8%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in y around inf 78.9%
associate-/l*80.5%
Simplified80.5%
Final simplification75.0%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 88.8%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in z around inf 37.9%
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
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 / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
def code(x, y, z, t): return x / ((t - z) / (y - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(t - z) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x / ((t - z) / (y - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2024103
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:alt
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))