
(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 14 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 -3.35e+25)
t_1
(if (<= z -9e-28)
(/ 1.0 (/ 1.0 x))
(if (<= z 3.6e-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 <= -3.35e+25) {
tmp = t_1;
} else if (z <= -9e-28) {
tmp = 1.0 / (1.0 / x);
} else if (z <= 3.6e-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 <= (-3.35d+25)) then
tmp = t_1
else if (z <= (-9d-28)) then
tmp = 1.0d0 / (1.0d0 / x)
else if (z <= 3.6d-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 <= -3.35e+25) {
tmp = t_1;
} else if (z <= -9e-28) {
tmp = 1.0 / (1.0 / x);
} else if (z <= 3.6e-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 <= -3.35e+25: tmp = t_1 elif z <= -9e-28: tmp = 1.0 / (1.0 / x) elif z <= 3.6e-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 <= -3.35e+25) tmp = t_1; elseif (z <= -9e-28) tmp = Float64(1.0 / Float64(1.0 / x)); elseif (z <= 3.6e-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 <= -3.35e+25) tmp = t_1; elseif (z <= -9e-28) tmp = 1.0 / (1.0 / x); elseif (z <= 3.6e-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, -3.35e+25], t$95$1, If[LessEqual[z, -9e-28], N[(1.0 / N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-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 -3.35 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-28}:\\
\;\;\;\;\frac{1}{\frac{1}{x}}\\
\mathbf{elif}\;z \leq 3.6 \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.25999999999999993e117 < z Initial program 78.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.0%
if -3.99999999999999978e58 < z < -3.35000000000000019e25 or -8.9999999999999996e-28 < z < 3.5999999999999998e-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 -3.35000000000000019e25 < z < -8.9999999999999996e-28Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.9%
Applied egg-rr99.9%
clear-num99.9%
inv-pow99.9%
associate-/l/99.9%
Applied egg-rr99.9%
unpow-199.9%
associate-/r*92.9%
Simplified92.9%
Taylor expanded in z around inf 63.1%
if 3.5999999999999998e-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 -3.5e+26)
t_1
(if (<= z -2.7e-28)
(/ 1.0 (/ 1.0 x))
(if (<= z 4.9e-14) t_1 (if (<= z 4.3e+119) (* 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 <= -3.5e+26) {
tmp = t_1;
} else if (z <= -2.7e-28) {
tmp = 1.0 / (1.0 / x);
} else if (z <= 4.9e-14) {
tmp = t_1;
} else if (z <= 4.3e+119) {
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 <= (-3.5d+26)) then
tmp = t_1
else if (z <= (-2.7d-28)) then
tmp = 1.0d0 / (1.0d0 / x)
else if (z <= 4.9d-14) then
tmp = t_1
else if (z <= 4.3d+119) 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 <= -3.5e+26) {
tmp = t_1;
} else if (z <= -2.7e-28) {
tmp = 1.0 / (1.0 / x);
} else if (z <= 4.9e-14) {
tmp = t_1;
} else if (z <= 4.3e+119) {
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 <= -3.5e+26: tmp = t_1 elif z <= -2.7e-28: tmp = 1.0 / (1.0 / x) elif z <= 4.9e-14: tmp = t_1 elif z <= 4.3e+119: 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 <= -3.5e+26) tmp = t_1; elseif (z <= -2.7e-28) tmp = Float64(1.0 / Float64(1.0 / x)); elseif (z <= 4.9e-14) tmp = t_1; elseif (z <= 4.3e+119) tmp = Float64(x * Float64(Float64(-z) / 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 <= -3.5e+26) tmp = t_1; elseif (z <= -2.7e-28) tmp = 1.0 / (1.0 / x); elseif (z <= 4.9e-14) tmp = t_1; elseif (z <= 4.3e+119) 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, -3.5e+26], t$95$1, If[LessEqual[z, -2.7e-28], N[(1.0 / N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e-14], t$95$1, If[LessEqual[z, 4.3e+119], 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 -3.5 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-28}:\\
\;\;\;\;\frac{1}{\frac{1}{x}}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+119}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.99999999999999978e58 or 4.30000000000000032e119 < z Initial program 78.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.0%
if -3.99999999999999978e58 < z < -3.4999999999999999e26 or -2.6999999999999999e-28 < z < 4.89999999999999995e-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 -3.4999999999999999e26 < z < -2.6999999999999999e-28Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.9%
Applied egg-rr99.9%
clear-num99.9%
inv-pow99.9%
associate-/l/99.9%
Applied egg-rr99.9%
unpow-199.9%
associate-/r*92.9%
Simplified92.9%
Taylor expanded in z around inf 63.1%
if 4.89999999999999995e-14 < z < 4.30000000000000032e119Initial 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 -3.3e+39)
t_1
(if (<= t 7.5e-49)
(* x (- 1.0 (/ y z)))
(if (or (<= t 2.95e+112) (not (<= t 1.8e+155)))
t_1
(/ x (- 1.0 (/ t z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / (y - z));
double tmp;
if (t <= -3.3e+39) {
tmp = t_1;
} else if (t <= 7.5e-49) {
tmp = x * (1.0 - (y / z));
} else if ((t <= 2.95e+112) || !(t <= 1.8e+155)) {
tmp = t_1;
} else {
tmp = x / (1.0 - (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) :: t_1
real(8) :: tmp
t_1 = x / (t / (y - z))
if (t <= (-3.3d+39)) then
tmp = t_1
else if (t <= 7.5d-49) then
tmp = x * (1.0d0 - (y / z))
else if ((t <= 2.95d+112) .or. (.not. (t <= 1.8d+155))) then
tmp = t_1
else
tmp = x / (1.0d0 - (t / z))
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 <= -3.3e+39) {
tmp = t_1;
} else if (t <= 7.5e-49) {
tmp = x * (1.0 - (y / z));
} else if ((t <= 2.95e+112) || !(t <= 1.8e+155)) {
tmp = t_1;
} else {
tmp = x / (1.0 - (t / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / (y - z)) tmp = 0 if t <= -3.3e+39: tmp = t_1 elif t <= 7.5e-49: tmp = x * (1.0 - (y / z)) elif (t <= 2.95e+112) or not (t <= 1.8e+155): tmp = t_1 else: tmp = x / (1.0 - (t / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / Float64(y - z))) tmp = 0.0 if (t <= -3.3e+39) tmp = t_1; elseif (t <= 7.5e-49) tmp = Float64(x * Float64(1.0 - Float64(y / z))); elseif ((t <= 2.95e+112) || !(t <= 1.8e+155)) tmp = t_1; else tmp = Float64(x / Float64(1.0 - Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / (y - z)); tmp = 0.0; if (t <= -3.3e+39) tmp = t_1; elseif (t <= 7.5e-49) tmp = x * (1.0 - (y / z)); elseif ((t <= 2.95e+112) || ~((t <= 1.8e+155))) tmp = t_1; else tmp = x / (1.0 - (t / z)); 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, -3.3e+39], t$95$1, If[LessEqual[t, 7.5e-49], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.95e+112], N[Not[LessEqual[t, 1.8e+155]], $MachinePrecision]], t$95$1, N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y - z}}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+112} \lor \neg \left(t \leq 1.8 \cdot 10^{+155}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\end{array}
\end{array}
if t < -3.30000000000000021e39 or 7.4999999999999998e-49 < t < 2.9500000000000002e112 or 1.80000000000000004e155 < 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 -3.30000000000000021e39 < 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 2.9500000000000002e112 < t < 1.80000000000000004e155Initial 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%
Taylor expanded in x around 0 73.1%
*-rgt-identity73.1%
times-frac86.4%
/-rgt-identity86.4%
associate-/r/100.0%
div-sub100.0%
*-inverses100.0%
Simplified100.0%
Final simplification84.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t (- y z)))))
(if (<= t -7.6e+39)
t_1
(if (<= t -6e-39)
(* x (/ z (- z t)))
(if (<= t -6e-80)
(/ (* x (- y z)) t)
(if (<= t 2.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 <= -7.6e+39) {
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 <= 2.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 <= (-7.6d+39)) 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 <= 2.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 <= -7.6e+39) {
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 <= 2.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 <= -7.6e+39: tmp = t_1 elif t <= -6e-39: tmp = x * (z / (z - t)) elif t <= -6e-80: tmp = (x * (y - z)) / t elif t <= 2.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 <= -7.6e+39) 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 <= 2.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 <= -7.6e+39) tmp = t_1; elseif (t <= -6e-39) tmp = x * (z / (z - t)); elseif (t <= -6e-80) tmp = (x * (y - z)) / t; elseif (t <= 2.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, -7.6e+39], 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, 2.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 -7.6 \cdot 10^{+39}:\\
\;\;\;\;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 2.2 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.5999999999999996e39 or 2.1999999999999999e-49 < t Initial program 86.4%
associate-/l*98.1%
Simplified98.1%
clear-num97.3%
un-div-inv97.4%
Applied egg-rr97.4%
Taylor expanded in t around inf 80.4%
if -7.5999999999999996e39 < t < -6.00000000000000055e-39Initial program 88.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 71.6%
mul-1-neg71.6%
distribute-neg-frac271.6%
neg-sub071.6%
associate--r-71.6%
neg-sub071.6%
+-commutative71.6%
sub-neg71.6%
associate-/l*82.8%
Simplified82.8%
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 < 2.1999999999999999e-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 -7.2e+58)
x
(if (or (<= z -1.3e+26) (and (not (<= z -4.9e-28)) (<= z 1.15e-15)))
(* x (/ y t))
x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.2e+58) {
tmp = x;
} else if ((z <= -1.3e+26) || (!(z <= -4.9e-28) && (z <= 1.15e-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 <= (-7.2d+58)) then
tmp = x
else if ((z <= (-1.3d+26)) .or. (.not. (z <= (-4.9d-28))) .and. (z <= 1.15d-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 <= -7.2e+58) {
tmp = x;
} else if ((z <= -1.3e+26) || (!(z <= -4.9e-28) && (z <= 1.15e-15))) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.2e+58: tmp = x elif (z <= -1.3e+26) or (not (z <= -4.9e-28) and (z <= 1.15e-15)): tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.2e+58) tmp = x; elseif ((z <= -1.3e+26) || (!(z <= -4.9e-28) && (z <= 1.15e-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 <= -7.2e+58) tmp = x; elseif ((z <= -1.3e+26) || (~((z <= -4.9e-28)) && (z <= 1.15e-15))) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.2e+58], x, If[Or[LessEqual[z, -1.3e+26], And[N[Not[LessEqual[z, -4.9e-28]], $MachinePrecision], LessEqual[z, 1.15e-15]]], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{+26} \lor \neg \left(z \leq -4.9 \cdot 10^{-28}\right) \land z \leq 1.15 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.19999999999999993e58 or -1.30000000000000001e26 < z < -4.9000000000000003e-28 or 1.14999999999999995e-15 < z Initial program 84.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.1%
if -7.19999999999999993e58 < z < -1.30000000000000001e26 or -4.9000000000000003e-28 < z < 1.14999999999999995e-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
(let* ((t_1 (/ x (/ t y))))
(if (<= z -4e+58)
x
(if (<= z -5.4e+26)
t_1
(if (<= z -6.3e-28) (/ 1.0 (/ 1.0 x)) (if (<= z 1.5e-15) t_1 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 <= -5.4e+26) {
tmp = t_1;
} else if (z <= -6.3e-28) {
tmp = 1.0 / (1.0 / x);
} else if (z <= 1.5e-15) {
tmp = t_1;
} 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 <= (-5.4d+26)) then
tmp = t_1
else if (z <= (-6.3d-28)) then
tmp = 1.0d0 / (1.0d0 / x)
else if (z <= 1.5d-15) then
tmp = t_1
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 <= -5.4e+26) {
tmp = t_1;
} else if (z <= -6.3e-28) {
tmp = 1.0 / (1.0 / x);
} else if (z <= 1.5e-15) {
tmp = t_1;
} 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 <= -5.4e+26: tmp = t_1 elif z <= -6.3e-28: tmp = 1.0 / (1.0 / x) elif z <= 1.5e-15: tmp = t_1 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 <= -5.4e+26) tmp = t_1; elseif (z <= -6.3e-28) tmp = Float64(1.0 / Float64(1.0 / x)); elseif (z <= 1.5e-15) tmp = t_1; 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 <= -5.4e+26) tmp = t_1; elseif (z <= -6.3e-28) tmp = 1.0 / (1.0 / x); elseif (z <= 1.5e-15) tmp = t_1; 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, -5.4e+26], t$95$1, If[LessEqual[z, -6.3e-28], N[(1.0 / N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-15], t$95$1, 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 -5.4 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.3 \cdot 10^{-28}:\\
\;\;\;\;\frac{1}{\frac{1}{x}}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.99999999999999978e58 or 1.5e-15 < z Initial program 82.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.9%
if -3.99999999999999978e58 < z < -5.4e26 or -6.2999999999999997e-28 < z < 1.5e-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%
if -5.4e26 < z < -6.2999999999999997e-28Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.9%
Applied egg-rr99.9%
clear-num99.9%
inv-pow99.9%
associate-/l/99.9%
Applied egg-rr99.9%
unpow-199.9%
associate-/r*92.9%
Simplified92.9%
Taylor expanded in z around inf 63.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y t))))
(if (<= z -4.1e+58)
x
(if (<= z -3.35e+25)
t_1
(if (<= z -2.4e-28) (/ 1.0 (/ 1.0 x)) (if (<= z 3.2e-16) t_1 x))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / t);
double tmp;
if (z <= -4.1e+58) {
tmp = x;
} else if (z <= -3.35e+25) {
tmp = t_1;
} else if (z <= -2.4e-28) {
tmp = 1.0 / (1.0 / x);
} else if (z <= 3.2e-16) {
tmp = t_1;
} 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 * (y / t)
if (z <= (-4.1d+58)) then
tmp = x
else if (z <= (-3.35d+25)) then
tmp = t_1
else if (z <= (-2.4d-28)) then
tmp = 1.0d0 / (1.0d0 / x)
else if (z <= 3.2d-16) then
tmp = t_1
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 * (y / t);
double tmp;
if (z <= -4.1e+58) {
tmp = x;
} else if (z <= -3.35e+25) {
tmp = t_1;
} else if (z <= -2.4e-28) {
tmp = 1.0 / (1.0 / x);
} else if (z <= 3.2e-16) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / t) tmp = 0 if z <= -4.1e+58: tmp = x elif z <= -3.35e+25: tmp = t_1 elif z <= -2.4e-28: tmp = 1.0 / (1.0 / x) elif z <= 3.2e-16: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / t)) tmp = 0.0 if (z <= -4.1e+58) tmp = x; elseif (z <= -3.35e+25) tmp = t_1; elseif (z <= -2.4e-28) tmp = Float64(1.0 / Float64(1.0 / x)); elseif (z <= 3.2e-16) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / t); tmp = 0.0; if (z <= -4.1e+58) tmp = x; elseif (z <= -3.35e+25) tmp = t_1; elseif (z <= -2.4e-28) tmp = 1.0 / (1.0 / x); elseif (z <= 3.2e-16) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+58], x, If[LessEqual[z, -3.35e+25], t$95$1, If[LessEqual[z, -2.4e-28], N[(1.0 / N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-16], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.35 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-28}:\\
\;\;\;\;\frac{1}{\frac{1}{x}}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.1e58 or 3.20000000000000023e-16 < z Initial program 82.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.9%
if -4.1e58 < z < -3.35000000000000019e25 or -2.4000000000000002e-28 < z < 3.20000000000000023e-16Initial program 93.6%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around 0 65.8%
associate-/l*67.2%
Simplified67.2%
if -3.35000000000000019e25 < z < -2.4000000000000002e-28Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.9%
Applied egg-rr99.9%
clear-num99.9%
inv-pow99.9%
associate-/l/99.9%
Applied egg-rr99.9%
unpow-199.9%
associate-/r*92.9%
Simplified92.9%
Taylor expanded in z around inf 63.1%
(FPCore (x y z t)
:precision binary64
(if (<= t -9e+183)
(/ x (/ t (- z)))
(if (or (<= t -1.55e+40) (not (<= t 7.5e-49)))
(/ x (/ t y))
(* x (- 1.0 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9e+183) {
tmp = x / (t / -z);
} else if ((t <= -1.55e+40) || !(t <= 7.5e-49)) {
tmp = x / (t / y);
} else {
tmp = x * (1.0 - (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) :: tmp
if (t <= (-9d+183)) then
tmp = x / (t / -z)
else if ((t <= (-1.55d+40)) .or. (.not. (t <= 7.5d-49))) then
tmp = x / (t / y)
else
tmp = x * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9e+183) {
tmp = x / (t / -z);
} else if ((t <= -1.55e+40) || !(t <= 7.5e-49)) {
tmp = x / (t / y);
} else {
tmp = x * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -9e+183: tmp = x / (t / -z) elif (t <= -1.55e+40) or not (t <= 7.5e-49): tmp = x / (t / y) else: tmp = x * (1.0 - (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -9e+183) tmp = Float64(x / Float64(t / Float64(-z))); elseif ((t <= -1.55e+40) || !(t <= 7.5e-49)) tmp = Float64(x / Float64(t / y)); else tmp = Float64(x * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -9e+183) tmp = x / (t / -z); elseif ((t <= -1.55e+40) || ~((t <= 7.5e-49))) tmp = x / (t / y); else tmp = x * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -9e+183], N[(x / N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.55e+40], N[Not[LessEqual[t, 7.5e-49]], $MachinePrecision]], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+183}:\\
\;\;\;\;\frac{x}{\frac{t}{-z}}\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+40} \lor \neg \left(t \leq 7.5 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if t < -9.00000000000000034e183Initial 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 -9.00000000000000034e183 < t < -1.5499999999999999e40 or 7.4999999999999998e-49 < t Initial program 84.9%
associate-/l*98.6%
Simplified98.6%
clear-num97.6%
un-div-inv97.8%
Applied egg-rr97.8%
Taylor expanded in z around 0 59.5%
if -1.5499999999999999e40 < 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%
Final simplification73.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.1e-27) (not (<= z 1.05e-16))) (/ x (- 1.0 (/ t z))) (* y (/ x (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.1e-27) || !(z <= 1.05e-16)) {
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.1d-27)) .or. (.not. (z <= 1.05d-16))) 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.1e-27) || !(z <= 1.05e-16)) {
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.1e-27) or not (z <= 1.05e-16): 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.1e-27) || !(z <= 1.05e-16)) 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.1e-27) || ~((z <= 1.05e-16))) 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.1e-27], N[Not[LessEqual[z, 1.05e-16]], $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.1 \cdot 10^{-27} \lor \neg \left(z \leq 1.05 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\end{array}
\end{array}
if z < -1.09999999999999993e-27 or 1.0500000000000001e-16 < 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.09999999999999993e-27 < z < 1.0500000000000001e-16Initial 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 -1.3e-28) (not (<= z 2e-16))) (* x (/ z (- z t))) (* y (/ x (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.3e-28) || !(z <= 2e-16)) {
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 <= (-1.3d-28)) .or. (.not. (z <= 2d-16))) 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 <= -1.3e-28) || !(z <= 2e-16)) {
tmp = x * (z / (z - t));
} else {
tmp = y * (x / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.3e-28) or not (z <= 2e-16): tmp = x * (z / (z - t)) else: tmp = y * (x / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.3e-28) || !(z <= 2e-16)) 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 <= -1.3e-28) || ~((z <= 2e-16))) 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, -1.3e-28], N[Not[LessEqual[z, 2e-16]], $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 -1.3 \cdot 10^{-28} \lor \neg \left(z \leq 2 \cdot 10^{-16}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\end{array}
\end{array}
if z < -1.3e-28 or 2e-16 < 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 -1.3e-28 < z < 2e-16Initial 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 -4.2e-28) (not (<= z 7.6e-16))) (* x (/ z (- z t))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.2e-28) || !(z <= 7.6e-16)) {
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 <= (-4.2d-28)) .or. (.not. (z <= 7.6d-16))) 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 <= -4.2e-28) || !(z <= 7.6e-16)) {
tmp = x * (z / (z - t));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.2e-28) or not (z <= 7.6e-16): tmp = x * (z / (z - t)) else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.2e-28) || !(z <= 7.6e-16)) 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 <= -4.2e-28) || ~((z <= 7.6e-16))) 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, -4.2e-28], N[Not[LessEqual[z, 7.6e-16]], $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 -4.2 \cdot 10^{-28} \lor \neg \left(z \leq 7.6 \cdot 10^{-16}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -4.20000000000000013e-28 or 7.60000000000000024e-16 < 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 -4.20000000000000013e-28 < z < 7.60000000000000024e-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 simplification81.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.9e-28) (not (<= z 8.6e-15))) (* x (- 1.0 (/ y z))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.9e-28) || !(z <= 8.6e-15)) {
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 <= (-4.9d-28)) .or. (.not. (z <= 8.6d-15))) 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 <= -4.9e-28) || !(z <= 8.6e-15)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.9e-28) or not (z <= 8.6e-15): 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 <= -4.9e-28) || !(z <= 8.6e-15)) 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 <= -4.9e-28) || ~((z <= 8.6e-15))) 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, -4.9e-28], N[Not[LessEqual[z, 8.6e-15]], $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 -4.9 \cdot 10^{-28} \lor \neg \left(z \leq 8.6 \cdot 10^{-15}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -4.9000000000000003e-28 or 8.5999999999999993e-15 < 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 -4.9000000000000003e-28 < z < 8.5999999999999993e-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 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)))