
(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 11 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 86.9%
associate-/l*96.8%
Simplified96.8%
Final simplification96.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -4.4e-70)
t_1
(if (<= z 1e-137)
(/ (* x y) t)
(if (or (<= z 1.35e-49) (not (<= z 1.3e+16))) t_1 (* y (/ x t)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -4.4e-70) {
tmp = t_1;
} else if (z <= 1e-137) {
tmp = (x * y) / t;
} else if ((z <= 1.35e-49) || !(z <= 1.3e+16)) {
tmp = t_1;
} else {
tmp = y * (x / 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 * (1.0d0 - (y / z))
if (z <= (-4.4d-70)) then
tmp = t_1
else if (z <= 1d-137) then
tmp = (x * y) / t
else if ((z <= 1.35d-49) .or. (.not. (z <= 1.3d+16))) then
tmp = t_1
else
tmp = y * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -4.4e-70) {
tmp = t_1;
} else if (z <= 1e-137) {
tmp = (x * y) / t;
} else if ((z <= 1.35e-49) || !(z <= 1.3e+16)) {
tmp = t_1;
} else {
tmp = y * (x / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -4.4e-70: tmp = t_1 elif z <= 1e-137: tmp = (x * y) / t elif (z <= 1.35e-49) or not (z <= 1.3e+16): tmp = t_1 else: tmp = y * (x / t) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -4.4e-70) tmp = t_1; elseif (z <= 1e-137) tmp = Float64(Float64(x * y) / t); elseif ((z <= 1.35e-49) || !(z <= 1.3e+16)) tmp = t_1; else tmp = Float64(y * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -4.4e-70) tmp = t_1; elseif (z <= 1e-137) tmp = (x * y) / t; elseif ((z <= 1.35e-49) || ~((z <= 1.3e+16))) tmp = t_1; else tmp = y * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e-70], t$95$1, If[LessEqual[z, 1e-137], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, 1.35e-49], N[Not[LessEqual[z, 1.3e+16]], $MachinePrecision]], t$95$1, N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-137}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-49} \lor \neg \left(z \leq 1.3 \cdot 10^{+16}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\end{array}
\end{array}
if z < -4.3999999999999998e-70 or 9.99999999999999978e-138 < z < 1.35e-49 or 1.3e16 < z Initial program 83.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 58.6%
mul-1-neg58.6%
associate-/l*70.6%
distribute-rgt-neg-in70.6%
distribute-frac-neg70.6%
neg-sub070.6%
associate--r-70.6%
neg-sub070.6%
+-commutative70.6%
sub-neg70.6%
div-sub70.6%
*-inverses70.6%
Simplified70.6%
if -4.3999999999999998e-70 < z < 9.99999999999999978e-138Initial program 93.8%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in z around 0 74.5%
if 1.35e-49 < z < 1.3e16Initial program 92.0%
associate-/l*99.9%
Simplified99.9%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
div-sub99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 58.1%
*-rgt-identity58.1%
times-frac65.8%
/-rgt-identity65.8%
Simplified65.8%
Final simplification71.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* x y) (- t z))))
(if (<= y -1.3e+165)
t_1
(if (<= y -4.6e+109)
(* x (- 1.0 (/ y z)))
(if (<= y -1.35e+47)
(* y (/ x (- t z)))
(if (<= y 3.5e-5) (/ x (- 1.0 (/ t z))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * y) / (t - z);
double tmp;
if (y <= -1.3e+165) {
tmp = t_1;
} else if (y <= -4.6e+109) {
tmp = x * (1.0 - (y / z));
} else if (y <= -1.35e+47) {
tmp = y * (x / (t - z));
} else if (y <= 3.5e-5) {
tmp = x / (1.0 - (t / 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 * y) / (t - z)
if (y <= (-1.3d+165)) then
tmp = t_1
else if (y <= (-4.6d+109)) then
tmp = x * (1.0d0 - (y / z))
else if (y <= (-1.35d+47)) then
tmp = y * (x / (t - z))
else if (y <= 3.5d-5) then
tmp = x / (1.0d0 - (t / 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 * y) / (t - z);
double tmp;
if (y <= -1.3e+165) {
tmp = t_1;
} else if (y <= -4.6e+109) {
tmp = x * (1.0 - (y / z));
} else if (y <= -1.35e+47) {
tmp = y * (x / (t - z));
} else if (y <= 3.5e-5) {
tmp = x / (1.0 - (t / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * y) / (t - z) tmp = 0 if y <= -1.3e+165: tmp = t_1 elif y <= -4.6e+109: tmp = x * (1.0 - (y / z)) elif y <= -1.35e+47: tmp = y * (x / (t - z)) elif y <= 3.5e-5: tmp = x / (1.0 - (t / z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * y) / Float64(t - z)) tmp = 0.0 if (y <= -1.3e+165) tmp = t_1; elseif (y <= -4.6e+109) tmp = Float64(x * Float64(1.0 - Float64(y / z))); elseif (y <= -1.35e+47) tmp = Float64(y * Float64(x / Float64(t - z))); elseif (y <= 3.5e-5) tmp = Float64(x / Float64(1.0 - Float64(t / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * y) / (t - z); tmp = 0.0; if (y <= -1.3e+165) tmp = t_1; elseif (y <= -4.6e+109) tmp = x * (1.0 - (y / z)); elseif (y <= -1.35e+47) tmp = y * (x / (t - z)); elseif (y <= 3.5e-5) tmp = x / (1.0 - (t / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e+165], t$95$1, If[LessEqual[y, -4.6e+109], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e+47], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-5], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{t - z}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+109}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.3000000000000001e165 or 3.4999999999999997e-5 < y Initial program 88.5%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in y around inf 77.0%
if -1.3000000000000001e165 < y < -4.60000000000000021e109Initial program 92.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 85.2%
mul-1-neg85.2%
associate-/l*92.6%
distribute-rgt-neg-in92.6%
distribute-frac-neg92.6%
neg-sub092.6%
associate--r-92.6%
neg-sub092.6%
+-commutative92.6%
sub-neg92.6%
div-sub92.6%
*-inverses92.6%
Simplified92.6%
if -4.60000000000000021e109 < y < -1.34999999999999998e47Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
clear-num99.2%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in y around inf 85.7%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
if -1.34999999999999998e47 < y < 3.4999999999999997e-5Initial program 84.2%
associate-/l*99.0%
Simplified99.0%
clear-num98.4%
un-div-inv98.5%
Applied egg-rr98.5%
div-sub98.5%
Applied egg-rr98.5%
Taylor expanded in y around 0 85.4%
mul-1-neg85.4%
unsub-neg85.4%
Simplified85.4%
Final simplification82.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* x y) (- t z))))
(if (<= y -1.12e+184)
t_1
(if (<= y -2.25e+102)
(- x (/ (* x y) z))
(if (<= y -2.2e+48)
(* y (/ x (- t z)))
(if (<= y 0.00078) (/ x (- 1.0 (/ t z))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * y) / (t - z);
double tmp;
if (y <= -1.12e+184) {
tmp = t_1;
} else if (y <= -2.25e+102) {
tmp = x - ((x * y) / z);
} else if (y <= -2.2e+48) {
tmp = y * (x / (t - z));
} else if (y <= 0.00078) {
tmp = x / (1.0 - (t / 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 * y) / (t - z)
if (y <= (-1.12d+184)) then
tmp = t_1
else if (y <= (-2.25d+102)) then
tmp = x - ((x * y) / z)
else if (y <= (-2.2d+48)) then
tmp = y * (x / (t - z))
else if (y <= 0.00078d0) then
tmp = x / (1.0d0 - (t / 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 * y) / (t - z);
double tmp;
if (y <= -1.12e+184) {
tmp = t_1;
} else if (y <= -2.25e+102) {
tmp = x - ((x * y) / z);
} else if (y <= -2.2e+48) {
tmp = y * (x / (t - z));
} else if (y <= 0.00078) {
tmp = x / (1.0 - (t / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * y) / (t - z) tmp = 0 if y <= -1.12e+184: tmp = t_1 elif y <= -2.25e+102: tmp = x - ((x * y) / z) elif y <= -2.2e+48: tmp = y * (x / (t - z)) elif y <= 0.00078: tmp = x / (1.0 - (t / z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * y) / Float64(t - z)) tmp = 0.0 if (y <= -1.12e+184) tmp = t_1; elseif (y <= -2.25e+102) tmp = Float64(x - Float64(Float64(x * y) / z)); elseif (y <= -2.2e+48) tmp = Float64(y * Float64(x / Float64(t - z))); elseif (y <= 0.00078) tmp = Float64(x / Float64(1.0 - Float64(t / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * y) / (t - z); tmp = 0.0; if (y <= -1.12e+184) tmp = t_1; elseif (y <= -2.25e+102) tmp = x - ((x * y) / z); elseif (y <= -2.2e+48) tmp = y * (x / (t - z)); elseif (y <= 0.00078) tmp = x / (1.0 - (t / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.12e+184], t$95$1, If[LessEqual[y, -2.25e+102], N[(x - N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e+48], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00078], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{t - z}\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.25 \cdot 10^{+102}:\\
\;\;\;\;x - \frac{x \cdot y}{z}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+48}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\mathbf{elif}\;y \leq 0.00078:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.12000000000000007e184 or 7.79999999999999986e-4 < y Initial program 88.4%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in y around inf 76.7%
if -1.12000000000000007e184 < y < -2.2500000000000001e102Initial program 92.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around 0 86.3%
mul-1-neg86.3%
associate-/l*93.0%
distribute-rgt-neg-in93.0%
distribute-frac-neg93.0%
neg-sub093.0%
associate--r-93.0%
neg-sub093.0%
+-commutative93.0%
sub-neg93.0%
div-sub93.0%
*-inverses93.0%
Simplified93.0%
Taylor expanded in y around 0 93.2%
associate-*r/93.2%
mul-1-neg93.2%
distribute-rgt-neg-out93.2%
Simplified93.2%
if -2.2500000000000001e102 < y < -2.1999999999999999e48Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
clear-num99.2%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in y around inf 85.7%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
if -2.1999999999999999e48 < y < 7.79999999999999986e-4Initial program 84.2%
associate-/l*99.0%
Simplified99.0%
clear-num98.4%
un-div-inv98.5%
Applied egg-rr98.5%
div-sub98.5%
Applied egg-rr98.5%
Taylor expanded in y around 0 85.4%
mul-1-neg85.4%
unsub-neg85.4%
Simplified85.4%
Final simplification82.7%
(FPCore (x y z t)
:precision binary64
(if (<= z -940000000.0)
x
(if (<= z 1.95e-161)
(/ (* x y) t)
(if (<= z 4.6e-117)
(/ (* x y) (- z))
(if (<= z 3.2e+72) (* x (/ y t)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -940000000.0) {
tmp = x;
} else if (z <= 1.95e-161) {
tmp = (x * y) / t;
} else if (z <= 4.6e-117) {
tmp = (x * y) / -z;
} else if (z <= 3.2e+72) {
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 <= (-940000000.0d0)) then
tmp = x
else if (z <= 1.95d-161) then
tmp = (x * y) / t
else if (z <= 4.6d-117) then
tmp = (x * y) / -z
else if (z <= 3.2d+72) 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 <= -940000000.0) {
tmp = x;
} else if (z <= 1.95e-161) {
tmp = (x * y) / t;
} else if (z <= 4.6e-117) {
tmp = (x * y) / -z;
} else if (z <= 3.2e+72) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -940000000.0: tmp = x elif z <= 1.95e-161: tmp = (x * y) / t elif z <= 4.6e-117: tmp = (x * y) / -z elif z <= 3.2e+72: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -940000000.0) tmp = x; elseif (z <= 1.95e-161) tmp = Float64(Float64(x * y) / t); elseif (z <= 4.6e-117) tmp = Float64(Float64(x * y) / Float64(-z)); elseif (z <= 3.2e+72) 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 <= -940000000.0) tmp = x; elseif (z <= 1.95e-161) tmp = (x * y) / t; elseif (z <= 4.6e-117) tmp = (x * y) / -z; elseif (z <= 3.2e+72) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -940000000.0], x, If[LessEqual[z, 1.95e-161], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 4.6e-117], N[(N[(x * y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 3.2e+72], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -940000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-161}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-117}:\\
\;\;\;\;\frac{x \cdot y}{-z}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+72}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.4e8 or 3.2000000000000001e72 < z Initial program 77.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 63.1%
if -9.4e8 < z < 1.94999999999999987e-161Initial program 94.5%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in z around 0 69.7%
if 1.94999999999999987e-161 < z < 4.59999999999999989e-117Initial program 90.4%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in t around 0 71.0%
mul-1-neg71.0%
associate-/l*42.8%
distribute-rgt-neg-in42.8%
distribute-frac-neg42.8%
neg-sub042.8%
associate--r-42.8%
neg-sub042.8%
+-commutative42.8%
sub-neg42.8%
div-sub42.8%
*-inverses42.8%
Simplified42.8%
Taylor expanded in y around inf 71.0%
associate-*r/71.0%
mul-1-neg71.0%
distribute-rgt-neg-out71.0%
Simplified71.0%
if 4.59999999999999989e-117 < z < 3.2000000000000001e72Initial program 97.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 44.6%
associate-/l*46.9%
Simplified46.9%
Final simplification63.2%
(FPCore (x y z t) :precision binary64 (if (<= t -170000.0) (* x (/ z (- z t))) (if (<= t 5e-55) (* x (- 1.0 (/ y z))) (* x (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -170000.0) {
tmp = x * (z / (z - t));
} else if (t <= 5e-55) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / 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 (t <= (-170000.0d0)) then
tmp = x * (z / (z - t))
else if (t <= 5d-55) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -170000.0) {
tmp = x * (z / (z - t));
} else if (t <= 5e-55) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -170000.0: tmp = x * (z / (z - t)) elif t <= 5e-55: tmp = x * (1.0 - (y / z)) else: tmp = x * (y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -170000.0) tmp = Float64(x * Float64(z / Float64(z - t))); elseif (t <= 5e-55) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -170000.0) tmp = x * (z / (z - t)); elseif (t <= 5e-55) tmp = x * (1.0 - (y / z)); else tmp = x * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -170000.0], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-55], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -170000:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-55}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -1.7e5Initial program 82.7%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in y around 0 60.8%
mul-1-neg60.8%
distribute-neg-frac260.8%
neg-sub060.8%
associate--r-60.8%
neg-sub060.8%
+-commutative60.8%
sub-neg60.8%
associate-/l*75.1%
Simplified75.1%
if -1.7e5 < t < 5.0000000000000002e-55Initial program 87.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in t around 0 74.7%
mul-1-neg74.7%
associate-/l*80.9%
distribute-rgt-neg-in80.9%
distribute-frac-neg80.9%
neg-sub080.9%
associate--r-80.9%
neg-sub080.9%
+-commutative80.9%
sub-neg80.9%
div-sub80.9%
*-inverses80.9%
Simplified80.9%
if 5.0000000000000002e-55 < t Initial program 90.1%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in z around 0 59.0%
associate-/l*61.6%
Simplified61.6%
Final simplification74.3%
(FPCore (x y z t) :precision binary64 (if (<= t -1500.0) (* x (/ z (- z t))) (if (<= t 5e-55) (* x (- 1.0 (/ y z))) (* x (/ (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1500.0) {
tmp = x * (z / (z - t));
} else if (t <= 5e-55) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * ((y - 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) :: tmp
if (t <= (-1500.0d0)) then
tmp = x * (z / (z - t))
else if (t <= 5d-55) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x * ((y - z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1500.0) {
tmp = x * (z / (z - t));
} else if (t <= 5e-55) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * ((y - z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1500.0: tmp = x * (z / (z - t)) elif t <= 5e-55: tmp = x * (1.0 - (y / z)) else: tmp = x * ((y - z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1500.0) tmp = Float64(x * Float64(z / Float64(z - t))); elseif (t <= 5e-55) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(Float64(y - z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1500.0) tmp = x * (z / (z - t)); elseif (t <= 5e-55) tmp = x * (1.0 - (y / z)); else tmp = x * ((y - z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1500.0], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-55], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1500:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-55}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\end{array}
\end{array}
if t < -1500Initial program 82.7%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in y around 0 60.8%
mul-1-neg60.8%
distribute-neg-frac260.8%
neg-sub060.8%
associate--r-60.8%
neg-sub060.8%
+-commutative60.8%
sub-neg60.8%
associate-/l*75.1%
Simplified75.1%
if -1500 < t < 5.0000000000000002e-55Initial program 87.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in t around 0 74.7%
mul-1-neg74.7%
associate-/l*80.9%
distribute-rgt-neg-in80.9%
distribute-frac-neg80.9%
neg-sub080.9%
associate--r-80.9%
neg-sub080.9%
+-commutative80.9%
sub-neg80.9%
div-sub80.9%
*-inverses80.9%
Simplified80.9%
if 5.0000000000000002e-55 < t Initial program 90.1%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in t around inf 76.2%
associate-/l*81.5%
Simplified81.5%
Final simplification79.6%
(FPCore (x y z t) :precision binary64 (if (<= t -31000.0) (* x (/ z (- z t))) (if (<= t 5e-55) (- x (* x (/ y z))) (* x (/ (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -31000.0) {
tmp = x * (z / (z - t));
} else if (t <= 5e-55) {
tmp = x - (x * (y / z));
} else {
tmp = x * ((y - 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) :: tmp
if (t <= (-31000.0d0)) then
tmp = x * (z / (z - t))
else if (t <= 5d-55) then
tmp = x - (x * (y / z))
else
tmp = x * ((y - z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -31000.0) {
tmp = x * (z / (z - t));
} else if (t <= 5e-55) {
tmp = x - (x * (y / z));
} else {
tmp = x * ((y - z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -31000.0: tmp = x * (z / (z - t)) elif t <= 5e-55: tmp = x - (x * (y / z)) else: tmp = x * ((y - z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -31000.0) tmp = Float64(x * Float64(z / Float64(z - t))); elseif (t <= 5e-55) tmp = Float64(x - Float64(x * Float64(y / z))); else tmp = Float64(x * Float64(Float64(y - z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -31000.0) tmp = x * (z / (z - t)); elseif (t <= 5e-55) tmp = x - (x * (y / z)); else tmp = x * ((y - z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -31000.0], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-55], N[(x - N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -31000:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-55}:\\
\;\;\;\;x - x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\end{array}
\end{array}
if t < -31000Initial program 82.7%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in y around 0 60.8%
mul-1-neg60.8%
distribute-neg-frac260.8%
neg-sub060.8%
associate--r-60.8%
neg-sub060.8%
+-commutative60.8%
sub-neg60.8%
associate-/l*75.1%
Simplified75.1%
if -31000 < t < 5.0000000000000002e-55Initial program 87.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in t around 0 74.7%
mul-1-neg74.7%
associate-/l*80.9%
distribute-rgt-neg-in80.9%
distribute-frac-neg80.9%
neg-sub080.9%
associate--r-80.9%
neg-sub080.9%
+-commutative80.9%
sub-neg80.9%
div-sub80.9%
*-inverses80.9%
Simplified80.9%
Taylor expanded in y around 0 82.5%
associate-*r/82.5%
mul-1-neg82.5%
distribute-rgt-neg-out82.5%
Simplified82.5%
div-inv82.4%
*-commutative82.4%
add-sqr-sqrt41.1%
sqrt-unprod54.6%
sqr-neg54.6%
sqrt-unprod22.2%
add-sqr-sqrt45.5%
*-commutative45.5%
remove-double-neg45.5%
distribute-rgt-neg-out45.5%
cancel-sign-sub-inv45.5%
associate-*l*46.6%
div-inv46.6%
add-sqr-sqrt23.6%
sqrt-unprod56.6%
sqr-neg56.6%
sqrt-unprod40.5%
add-sqr-sqrt80.9%
Applied egg-rr80.9%
if 5.0000000000000002e-55 < t Initial program 90.1%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in t around inf 76.2%
associate-/l*81.5%
Simplified81.5%
Final simplification79.6%
(FPCore (x y z t) :precision binary64 (if (<= z -1050000000.0) x (if (<= z 2.65e+72) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1050000000.0) {
tmp = x;
} else if (z <= 2.65e+72) {
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 <= (-1050000000.0d0)) then
tmp = x
else if (z <= 2.65d+72) 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 <= -1050000000.0) {
tmp = x;
} else if (z <= 2.65e+72) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1050000000.0: tmp = x elif z <= 2.65e+72: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1050000000.0) tmp = x; elseif (z <= 2.65e+72) 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 <= -1050000000.0) tmp = x; elseif (z <= 2.65e+72) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1050000000.0], x, If[LessEqual[z, 2.65e+72], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1050000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{+72}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.05e9 or 2.6500000000000001e72 < z Initial program 77.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 63.1%
if -1.05e9 < z < 2.6500000000000001e72Initial program 95.1%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in z around 0 59.2%
associate-/l*59.0%
Simplified59.0%
Final simplification60.9%
(FPCore (x y z t) :precision binary64 (if (<= z -27500000000.0) x (if (<= z 2.9e+72) (/ (* x y) t) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -27500000000.0) {
tmp = x;
} else if (z <= 2.9e+72) {
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 <= (-27500000000.0d0)) then
tmp = x
else if (z <= 2.9d+72) 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 <= -27500000000.0) {
tmp = x;
} else if (z <= 2.9e+72) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -27500000000.0: tmp = x elif z <= 2.9e+72: tmp = (x * y) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -27500000000.0) tmp = x; elseif (z <= 2.9e+72) tmp = Float64(Float64(x * y) / t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -27500000000.0) tmp = x; elseif (z <= 2.9e+72) tmp = (x * y) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -27500000000.0], x, If[LessEqual[z, 2.9e+72], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -27500000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+72}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.75e10 or 2.90000000000000017e72 < z Initial program 77.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 63.1%
if -2.75e10 < z < 2.90000000000000017e72Initial program 95.1%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in z around 0 59.2%
Final simplification61.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 86.9%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in z around inf 35.2%
Final simplification35.2%
(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 2024066
(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)))