
(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 85.6%
associate-*r/98.1%
Simplified98.1%
Final simplification98.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))) (t_2 (* x (/ (- y z) t))))
(if (<= z -8.5e+98)
x
(if (<= z -1.7e-21)
t_2
(if (<= z -3.3e-113)
t_1
(if (<= z 8.4e-128) t_2 (if (<= z 5.4e+180) t_1 x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double t_2 = x * ((y - z) / t);
double tmp;
if (z <= -8.5e+98) {
tmp = x;
} else if (z <= -1.7e-21) {
tmp = t_2;
} else if (z <= -3.3e-113) {
tmp = t_1;
} else if (z <= 8.4e-128) {
tmp = t_2;
} else if (z <= 5.4e+180) {
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) :: t_2
real(8) :: tmp
t_1 = x * (y / (t - z))
t_2 = x * ((y - z) / t)
if (z <= (-8.5d+98)) then
tmp = x
else if (z <= (-1.7d-21)) then
tmp = t_2
else if (z <= (-3.3d-113)) then
tmp = t_1
else if (z <= 8.4d-128) then
tmp = t_2
else if (z <= 5.4d+180) 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 - z));
double t_2 = x * ((y - z) / t);
double tmp;
if (z <= -8.5e+98) {
tmp = x;
} else if (z <= -1.7e-21) {
tmp = t_2;
} else if (z <= -3.3e-113) {
tmp = t_1;
} else if (z <= 8.4e-128) {
tmp = t_2;
} else if (z <= 5.4e+180) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) t_2 = x * ((y - z) / t) tmp = 0 if z <= -8.5e+98: tmp = x elif z <= -1.7e-21: tmp = t_2 elif z <= -3.3e-113: tmp = t_1 elif z <= 8.4e-128: tmp = t_2 elif z <= 5.4e+180: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) t_2 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (z <= -8.5e+98) tmp = x; elseif (z <= -1.7e-21) tmp = t_2; elseif (z <= -3.3e-113) tmp = t_1; elseif (z <= 8.4e-128) tmp = t_2; elseif (z <= 5.4e+180) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); t_2 = x * ((y - z) / t); tmp = 0.0; if (z <= -8.5e+98) tmp = x; elseif (z <= -1.7e-21) tmp = t_2; elseif (z <= -3.3e-113) tmp = t_1; elseif (z <= 8.4e-128) tmp = t_2; elseif (z <= 5.4e+180) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+98], x, If[LessEqual[z, -1.7e-21], t$95$2, If[LessEqual[z, -3.3e-113], t$95$1, If[LessEqual[z, 8.4e-128], t$95$2, If[LessEqual[z, 5.4e+180], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
t_2 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+98}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-128}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+180}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.4999999999999996e98 or 5.40000000000000033e180 < z Initial program 71.3%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 74.7%
if -8.4999999999999996e98 < z < -1.7e-21 or -3.3000000000000002e-113 < z < 8.4000000000000004e-128Initial program 89.7%
associate-*r/96.7%
Simplified96.7%
Taylor expanded in t around inf 85.9%
if -1.7e-21 < z < -3.3000000000000002e-113 or 8.4000000000000004e-128 < z < 5.40000000000000033e180Initial program 93.6%
associate-*r/98.5%
Simplified98.5%
Taylor expanded in y around inf 70.4%
Final simplification78.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (/ (- t z) x))))
(if (<= z -7.4e-23)
(/ x (- 1.0 (/ t z)))
(if (<= z -4e-159)
t_1
(if (<= z 1.6e-124)
(* x (/ (- y z) t))
(if (<= z 9.5e+42) t_1 (/ x (/ (- z) (- y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = y / ((t - z) / x);
double tmp;
if (z <= -7.4e-23) {
tmp = x / (1.0 - (t / z));
} else if (z <= -4e-159) {
tmp = t_1;
} else if (z <= 1.6e-124) {
tmp = x * ((y - z) / t);
} else if (z <= 9.5e+42) {
tmp = t_1;
} else {
tmp = x / (-z / (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y / ((t - z) / x)
if (z <= (-7.4d-23)) then
tmp = x / (1.0d0 - (t / z))
else if (z <= (-4d-159)) then
tmp = t_1
else if (z <= 1.6d-124) then
tmp = x * ((y - z) / t)
else if (z <= 9.5d+42) then
tmp = t_1
else
tmp = x / (-z / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / ((t - z) / x);
double tmp;
if (z <= -7.4e-23) {
tmp = x / (1.0 - (t / z));
} else if (z <= -4e-159) {
tmp = t_1;
} else if (z <= 1.6e-124) {
tmp = x * ((y - z) / t);
} else if (z <= 9.5e+42) {
tmp = t_1;
} else {
tmp = x / (-z / (y - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = y / ((t - z) / x) tmp = 0 if z <= -7.4e-23: tmp = x / (1.0 - (t / z)) elif z <= -4e-159: tmp = t_1 elif z <= 1.6e-124: tmp = x * ((y - z) / t) elif z <= 9.5e+42: tmp = t_1 else: tmp = x / (-z / (y - z)) return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(Float64(t - z) / x)) tmp = 0.0 if (z <= -7.4e-23) tmp = Float64(x / Float64(1.0 - Float64(t / z))); elseif (z <= -4e-159) tmp = t_1; elseif (z <= 1.6e-124) tmp = Float64(x * Float64(Float64(y - z) / t)); elseif (z <= 9.5e+42) tmp = t_1; else tmp = Float64(x / Float64(Float64(-z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / ((t - z) / x); tmp = 0.0; if (z <= -7.4e-23) tmp = x / (1.0 - (t / z)); elseif (z <= -4e-159) tmp = t_1; elseif (z <= 1.6e-124) tmp = x * ((y - z) / t); elseif (z <= 9.5e+42) tmp = t_1; else tmp = x / (-z / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e-23], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-159], t$95$1, If[LessEqual[z, 1.6e-124], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+42], t$95$1, N[(x / N[((-z) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{t - z}{x}}\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-124}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{-z}{y - z}}\\
\end{array}
\end{array}
if z < -7.4000000000000005e-23Initial program 76.9%
associate-/l*98.6%
Simplified98.6%
div-sub98.6%
Applied egg-rr98.6%
Taylor expanded in y around 0 78.5%
mul-1-neg78.5%
unsub-neg78.5%
Simplified78.5%
if -7.4000000000000005e-23 < z < -3.99999999999999995e-159 or 1.60000000000000002e-124 < z < 9.50000000000000019e42Initial program 93.3%
associate-/l*96.5%
Simplified96.5%
div-sub96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 75.2%
associate-/l*80.1%
Simplified80.1%
if -3.99999999999999995e-159 < z < 1.60000000000000002e-124Initial program 91.2%
associate-*r/97.1%
Simplified97.1%
Taylor expanded in t around inf 93.3%
if 9.50000000000000019e42 < z Initial program 81.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 82.0%
neg-mul-182.0%
distribute-neg-frac82.0%
Simplified82.0%
Final simplification83.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))) (t_2 (/ x (- 1.0 (/ t z)))))
(if (<= z -5.8e-22)
t_2
(if (<= z -3.2e-113)
t_1
(if (<= z 5.6e-125) (* x (/ (- y z) t)) (if (<= z 5.2e+43) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double t_2 = x / (1.0 - (t / z));
double tmp;
if (z <= -5.8e-22) {
tmp = t_2;
} else if (z <= -3.2e-113) {
tmp = t_1;
} else if (z <= 5.6e-125) {
tmp = x * ((y - z) / t);
} else if (z <= 5.2e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = x * (y / (t - z))
t_2 = x / (1.0d0 - (t / z))
if (z <= (-5.8d-22)) then
tmp = t_2
else if (z <= (-3.2d-113)) then
tmp = t_1
else if (z <= 5.6d-125) then
tmp = x * ((y - z) / t)
else if (z <= 5.2d+43) then
tmp = t_1
else
tmp = t_2
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 t_2 = x / (1.0 - (t / z));
double tmp;
if (z <= -5.8e-22) {
tmp = t_2;
} else if (z <= -3.2e-113) {
tmp = t_1;
} else if (z <= 5.6e-125) {
tmp = x * ((y - z) / t);
} else if (z <= 5.2e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) t_2 = x / (1.0 - (t / z)) tmp = 0 if z <= -5.8e-22: tmp = t_2 elif z <= -3.2e-113: tmp = t_1 elif z <= 5.6e-125: tmp = x * ((y - z) / t) elif z <= 5.2e+43: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) t_2 = Float64(x / Float64(1.0 - Float64(t / z))) tmp = 0.0 if (z <= -5.8e-22) tmp = t_2; elseif (z <= -3.2e-113) tmp = t_1; elseif (z <= 5.6e-125) tmp = Float64(x * Float64(Float64(y - z) / t)); elseif (z <= 5.2e+43) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); t_2 = x / (1.0 - (t / z)); tmp = 0.0; if (z <= -5.8e-22) tmp = t_2; elseif (z <= -3.2e-113) tmp = t_1; elseif (z <= 5.6e-125) tmp = x * ((y - z) / t); elseif (z <= 5.2e+43) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e-22], t$95$2, If[LessEqual[z, -3.2e-113], t$95$1, If[LessEqual[z, 5.6e-125], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+43], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
t_2 := \frac{x}{1 - \frac{t}{z}}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-22}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-125}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.8000000000000003e-22 or 5.20000000000000042e43 < z Initial program 78.8%
associate-/l*99.1%
Simplified99.1%
div-sub99.1%
Applied egg-rr99.1%
Taylor expanded in y around 0 76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
if -5.8000000000000003e-22 < z < -3.2000000000000002e-113 or 5.6e-125 < z < 5.20000000000000042e43Initial program 94.2%
associate-*r/97.9%
Simplified97.9%
Taylor expanded in y around inf 80.7%
if -3.2000000000000002e-113 < z < 5.6e-125Initial program 90.9%
associate-*r/96.2%
Simplified96.2%
Taylor expanded in t around inf 91.5%
Final simplification82.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (/ (- t z) x))) (t_2 (/ x (- 1.0 (/ t z)))))
(if (<= z -3.8e-21)
t_2
(if (<= z -9e-160)
t_1
(if (<= z 4.6e-128) (* x (/ (- y z) t)) (if (<= z 8e+43) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = y / ((t - z) / x);
double t_2 = x / (1.0 - (t / z));
double tmp;
if (z <= -3.8e-21) {
tmp = t_2;
} else if (z <= -9e-160) {
tmp = t_1;
} else if (z <= 4.6e-128) {
tmp = x * ((y - z) / t);
} else if (z <= 8e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = y / ((t - z) / x)
t_2 = x / (1.0d0 - (t / z))
if (z <= (-3.8d-21)) then
tmp = t_2
else if (z <= (-9d-160)) then
tmp = t_1
else if (z <= 4.6d-128) then
tmp = x * ((y - z) / t)
else if (z <= 8d+43) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / ((t - z) / x);
double t_2 = x / (1.0 - (t / z));
double tmp;
if (z <= -3.8e-21) {
tmp = t_2;
} else if (z <= -9e-160) {
tmp = t_1;
} else if (z <= 4.6e-128) {
tmp = x * ((y - z) / t);
} else if (z <= 8e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / ((t - z) / x) t_2 = x / (1.0 - (t / z)) tmp = 0 if z <= -3.8e-21: tmp = t_2 elif z <= -9e-160: tmp = t_1 elif z <= 4.6e-128: tmp = x * ((y - z) / t) elif z <= 8e+43: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(Float64(t - z) / x)) t_2 = Float64(x / Float64(1.0 - Float64(t / z))) tmp = 0.0 if (z <= -3.8e-21) tmp = t_2; elseif (z <= -9e-160) tmp = t_1; elseif (z <= 4.6e-128) tmp = Float64(x * Float64(Float64(y - z) / t)); elseif (z <= 8e+43) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / ((t - z) / x); t_2 = x / (1.0 - (t / z)); tmp = 0.0; if (z <= -3.8e-21) tmp = t_2; elseif (z <= -9e-160) tmp = t_1; elseif (z <= 4.6e-128) tmp = x * ((y - z) / t); elseif (z <= 8e+43) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e-21], t$95$2, If[LessEqual[z, -9e-160], t$95$1, If[LessEqual[z, 4.6e-128], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+43], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{t - z}{x}}\\
t_2 := \frac{x}{1 - \frac{t}{z}}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-160}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-128}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.7999999999999998e-21 or 8.00000000000000011e43 < z Initial program 78.8%
associate-/l*99.1%
Simplified99.1%
div-sub99.1%
Applied egg-rr99.1%
Taylor expanded in y around 0 76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
if -3.7999999999999998e-21 < z < -9.00000000000000053e-160 or 4.6000000000000002e-128 < z < 8.00000000000000011e43Initial program 93.3%
associate-/l*96.5%
Simplified96.5%
div-sub96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 75.2%
associate-/l*80.1%
Simplified80.1%
if -9.00000000000000053e-160 < z < 4.6000000000000002e-128Initial program 91.2%
associate-*r/97.1%
Simplified97.1%
Taylor expanded in t around inf 93.3%
Final simplification82.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -5.2e+98)
x
(if (<= z -1.3e-32)
(* x (/ (- z) t))
(if (<= z -1.1e-131)
(/ x (/ (- z) y))
(if (<= z 7.5e+43) (/ x (/ t y)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.2e+98) {
tmp = x;
} else if (z <= -1.3e-32) {
tmp = x * (-z / t);
} else if (z <= -1.1e-131) {
tmp = x / (-z / y);
} else if (z <= 7.5e+43) {
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 <= (-5.2d+98)) then
tmp = x
else if (z <= (-1.3d-32)) then
tmp = x * (-z / t)
else if (z <= (-1.1d-131)) then
tmp = x / (-z / y)
else if (z <= 7.5d+43) 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 <= -5.2e+98) {
tmp = x;
} else if (z <= -1.3e-32) {
tmp = x * (-z / t);
} else if (z <= -1.1e-131) {
tmp = x / (-z / y);
} else if (z <= 7.5e+43) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.2e+98: tmp = x elif z <= -1.3e-32: tmp = x * (-z / t) elif z <= -1.1e-131: tmp = x / (-z / y) elif z <= 7.5e+43: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.2e+98) tmp = x; elseif (z <= -1.3e-32) tmp = Float64(x * Float64(Float64(-z) / t)); elseif (z <= -1.1e-131) tmp = Float64(x / Float64(Float64(-z) / y)); elseif (z <= 7.5e+43) 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 <= -5.2e+98) tmp = x; elseif (z <= -1.3e-32) tmp = x * (-z / t); elseif (z <= -1.1e-131) tmp = x / (-z / y); elseif (z <= 7.5e+43) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.2e+98], x, If[LessEqual[z, -1.3e-32], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-131], N[(x / N[((-z) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+43], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+98}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-131}:\\
\;\;\;\;\frac{x}{\frac{-z}{y}}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.1999999999999999e98 or 7.49999999999999967e43 < z Initial program 76.7%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 66.8%
if -5.1999999999999999e98 < z < -1.2999999999999999e-32Initial program 87.5%
associate-*r/98.3%
Simplified98.3%
Taylor expanded in t around inf 68.6%
Taylor expanded in y around 0 45.3%
mul-1-neg45.3%
associate-/l*43.2%
associate-/r/48.5%
distribute-rgt-neg-in48.5%
Simplified48.5%
if -1.2999999999999999e-32 < z < -1.1e-131Initial program 94.8%
associate-/l*99.6%
Simplified99.6%
div-sub99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 74.2%
Taylor expanded in t around 0 55.2%
associate-*r/55.2%
mul-1-neg55.2%
Simplified55.2%
if -1.1e-131 < z < 7.49999999999999967e43Initial program 91.4%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in z around 0 75.5%
Final simplification67.5%
(FPCore (x y z t) :precision binary64 (if (<= z -5.2e+98) x (if (<= z -3.9e-56) (* z (/ (- x) t)) (if (<= z 9.5e+42) (/ x (/ t y)) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.2e+98) {
tmp = x;
} else if (z <= -3.9e-56) {
tmp = z * (-x / t);
} else if (z <= 9.5e+42) {
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 <= (-5.2d+98)) then
tmp = x
else if (z <= (-3.9d-56)) then
tmp = z * (-x / t)
else if (z <= 9.5d+42) 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 <= -5.2e+98) {
tmp = x;
} else if (z <= -3.9e-56) {
tmp = z * (-x / t);
} else if (z <= 9.5e+42) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.2e+98: tmp = x elif z <= -3.9e-56: tmp = z * (-x / t) elif z <= 9.5e+42: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.2e+98) tmp = x; elseif (z <= -3.9e-56) tmp = Float64(z * Float64(Float64(-x) / t)); elseif (z <= 9.5e+42) 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 <= -5.2e+98) tmp = x; elseif (z <= -3.9e-56) tmp = z * (-x / t); elseif (z <= 9.5e+42) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.2e+98], x, If[LessEqual[z, -3.9e-56], N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+42], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+98}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-56}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+42}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.1999999999999999e98 or 9.50000000000000019e42 < z Initial program 76.7%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 66.8%
if -5.1999999999999999e98 < z < -3.9e-56Initial program 88.5%
associate-*r/98.5%
Simplified98.5%
Taylor expanded in t around inf 64.2%
Taylor expanded in y around 0 42.9%
associate-*r/42.9%
associate-*r*42.9%
neg-mul-142.9%
Simplified42.9%
Taylor expanded in z around 0 42.9%
mul-1-neg42.9%
associate-*r/40.9%
*-commutative40.9%
distribute-rgt-neg-in40.9%
Simplified40.9%
if -3.9e-56 < z < 9.50000000000000019e42Initial program 91.8%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in z around 0 70.1%
Final simplification65.1%
(FPCore (x y z t) :precision binary64 (if (<= z -5.8e+98) x (if (<= z -4e-57) (* x (/ (- z) t)) (if (<= z 1.5e+43) (/ x (/ t y)) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.8e+98) {
tmp = x;
} else if (z <= -4e-57) {
tmp = x * (-z / t);
} else if (z <= 1.5e+43) {
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 <= (-5.8d+98)) then
tmp = x
else if (z <= (-4d-57)) then
tmp = x * (-z / t)
else if (z <= 1.5d+43) 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 <= -5.8e+98) {
tmp = x;
} else if (z <= -4e-57) {
tmp = x * (-z / t);
} else if (z <= 1.5e+43) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.8e+98: tmp = x elif z <= -4e-57: tmp = x * (-z / t) elif z <= 1.5e+43: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.8e+98) tmp = x; elseif (z <= -4e-57) tmp = Float64(x * Float64(Float64(-z) / t)); elseif (z <= 1.5e+43) 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 <= -5.8e+98) tmp = x; elseif (z <= -4e-57) tmp = x * (-z / t); elseif (z <= 1.5e+43) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.8e+98], x, If[LessEqual[z, -4e-57], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+43], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+98}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-57}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.8000000000000002e98 or 1.50000000000000008e43 < z Initial program 76.7%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 66.8%
if -5.8000000000000002e98 < z < -3.99999999999999982e-57Initial program 88.5%
associate-*r/98.5%
Simplified98.5%
Taylor expanded in t around inf 64.2%
Taylor expanded in y around 0 42.9%
mul-1-neg42.9%
associate-/l*40.9%
associate-/r/45.7%
distribute-rgt-neg-in45.7%
Simplified45.7%
if -3.99999999999999982e-57 < z < 1.50000000000000008e43Initial program 91.8%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in z around 0 70.1%
Final simplification65.7%
(FPCore (x y z t) :precision binary64 (if (<= z -3.5e+101) x (if (<= z 5.4e+180) (* x (/ y (- t z))) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+101) {
tmp = x;
} else if (z <= 5.4e+180) {
tmp = x * (y / (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) :: tmp
if (z <= (-3.5d+101)) then
tmp = x
else if (z <= 5.4d+180) then
tmp = x * (y / (t - z))
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 <= -3.5e+101) {
tmp = x;
} else if (z <= 5.4e+180) {
tmp = x * (y / (t - z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.5e+101: tmp = x elif z <= 5.4e+180: tmp = x * (y / (t - z)) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.5e+101) tmp = x; elseif (z <= 5.4e+180) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.5e+101) tmp = x; elseif (z <= 5.4e+180) tmp = x * (y / (t - z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.5e+101], x, If[LessEqual[z, 5.4e+180], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+101}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+180}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.50000000000000023e101 or 5.40000000000000033e180 < z Initial program 71.3%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 74.7%
if -3.50000000000000023e101 < z < 5.40000000000000033e180Initial program 91.3%
associate-*r/97.4%
Simplified97.4%
Taylor expanded in y around inf 70.9%
Final simplification72.0%
(FPCore (x y z t) :precision binary64 (if (<= z -5.4e+98) x (if (<= z 3e+44) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.4e+98) {
tmp = x;
} else if (z <= 3e+44) {
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 <= (-5.4d+98)) then
tmp = x
else if (z <= 3d+44) 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 <= -5.4e+98) {
tmp = x;
} else if (z <= 3e+44) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.4e+98: tmp = x elif z <= 3e+44: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.4e+98) tmp = x; elseif (z <= 3e+44) 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 <= -5.4e+98) tmp = x; elseif (z <= 3e+44) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.4e+98], x, If[LessEqual[z, 3e+44], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+98}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.4e98 or 2.99999999999999987e44 < z Initial program 76.7%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 66.8%
if -5.4e98 < z < 2.99999999999999987e44Initial program 91.1%
associate-*r/97.1%
Simplified97.1%
Taylor expanded in z around 0 60.8%
Final simplification63.1%
(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 85.6%
associate-*r/98.1%
Simplified98.1%
Taylor expanded in z around inf 31.6%
Final simplification31.6%
(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 2023257
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))