
(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 9 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.3%
associate-/l*98.4%
Simplified98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.4e-41) (not (<= y 1.82e+53))) (/ x (/ (- t z) y)) (/ x (/ (- z t) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.4e-41) || !(y <= 1.82e+53)) {
tmp = x / ((t - z) / y);
} else {
tmp = x / ((z - 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 ((y <= (-4.4d-41)) .or. (.not. (y <= 1.82d+53))) then
tmp = x / ((t - z) / y)
else
tmp = x / ((z - t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.4e-41) || !(y <= 1.82e+53)) {
tmp = x / ((t - z) / y);
} else {
tmp = x / ((z - t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.4e-41) or not (y <= 1.82e+53): tmp = x / ((t - z) / y) else: tmp = x / ((z - t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.4e-41) || !(y <= 1.82e+53)) tmp = Float64(x / Float64(Float64(t - z) / y)); else tmp = Float64(x / Float64(Float64(z - t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.4e-41) || ~((y <= 1.82e+53))) tmp = x / ((t - z) / y); else tmp = x / ((z - t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.4e-41], N[Not[LessEqual[y, 1.82e+53]], $MachinePrecision]], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-41} \lor \neg \left(y \leq 1.82 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z - t}{z}}\\
\end{array}
\end{array}
if y < -4.4e-41 or 1.81999999999999999e53 < y Initial program 84.8%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in x around 0 84.8%
*-rgt-identity84.8%
times-frac89.8%
/-rgt-identity89.8%
associate-/r/98.9%
Simplified98.9%
Taylor expanded in y around inf 81.1%
if -4.4e-41 < y < 1.81999999999999999e53Initial program 87.4%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in x around 0 87.4%
*-rgt-identity87.4%
times-frac86.3%
/-rgt-identity86.3%
associate-/r/97.9%
Simplified97.9%
Taylor expanded in y around 0 82.8%
neg-mul-182.8%
Simplified82.8%
Final simplification82.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.2e-40) (not (<= y 3.3e+53))) (/ x (/ (- t z) y)) (* x (/ z (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e-40) || !(y <= 3.3e+53)) {
tmp = x / ((t - z) / y);
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5.2d-40)) .or. (.not. (y <= 3.3d+53))) then
tmp = x / ((t - z) / y)
else
tmp = x * (z / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e-40) || !(y <= 3.3e+53)) {
tmp = x / ((t - z) / y);
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.2e-40) or not (y <= 3.3e+53): tmp = x / ((t - z) / y) else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.2e-40) || !(y <= 3.3e+53)) tmp = Float64(x / Float64(Float64(t - z) / y)); else tmp = Float64(x * Float64(z / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.2e-40) || ~((y <= 3.3e+53))) tmp = x / ((t - z) / y); else tmp = x * (z / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.2e-40], N[Not[LessEqual[y, 3.3e+53]], $MachinePrecision]], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-40} \lor \neg \left(y \leq 3.3 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if y < -5.2000000000000003e-40 or 3.3000000000000002e53 < y Initial program 84.8%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in x around 0 84.8%
*-rgt-identity84.8%
times-frac89.8%
/-rgt-identity89.8%
associate-/r/98.9%
Simplified98.9%
Taylor expanded in y around inf 81.1%
if -5.2000000000000003e-40 < y < 3.3000000000000002e53Initial program 87.4%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in y around 0 70.3%
mul-1-neg70.3%
distribute-neg-frac270.3%
sub-neg70.3%
distribute-neg-in70.3%
remove-double-neg70.3%
+-commutative70.3%
sub-neg70.3%
associate-/l*82.8%
Simplified82.8%
Final simplification82.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1250.0) (not (<= t 5.4e+23))) (/ x (/ t (- y z))) (* x (- 1.0 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1250.0) || !(t <= 5.4e+23)) {
tmp = x / (t / (y - z));
} 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 <= (-1250.0d0)) .or. (.not. (t <= 5.4d+23))) then
tmp = x / (t / (y - z))
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 <= -1250.0) || !(t <= 5.4e+23)) {
tmp = x / (t / (y - z));
} else {
tmp = x * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1250.0) or not (t <= 5.4e+23): tmp = x / (t / (y - z)) else: tmp = x * (1.0 - (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1250.0) || !(t <= 5.4e+23)) tmp = Float64(x / Float64(t / Float64(y - z))); 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 <= -1250.0) || ~((t <= 5.4e+23))) tmp = x / (t / (y - z)); else tmp = x * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1250.0], N[Not[LessEqual[t, 5.4e+23]], $MachinePrecision]], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1250 \lor \neg \left(t \leq 5.4 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if t < -1250 or 5.3999999999999997e23 < t Initial program 83.0%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in x around 0 83.0%
*-rgt-identity83.0%
times-frac89.1%
/-rgt-identity89.1%
associate-/r/97.3%
Simplified97.3%
Taylor expanded in t around inf 77.9%
if -1250 < t < 5.3999999999999997e23Initial program 88.8%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around 0 73.0%
mul-1-neg73.0%
associate-/l*82.9%
distribute-rgt-neg-in82.9%
distribute-frac-neg82.9%
sub-neg82.9%
distribute-neg-in82.9%
remove-double-neg82.9%
+-commutative82.9%
sub-neg82.9%
div-sub82.9%
*-inverses82.9%
Simplified82.9%
Final simplification80.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6e-40) (not (<= y 4.1e+53))) (* y (/ x (- t z))) (* x (/ z (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6e-40) || !(y <= 4.1e+53)) {
tmp = y * (x / (t - z));
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-6d-40)) .or. (.not. (y <= 4.1d+53))) then
tmp = y * (x / (t - z))
else
tmp = x * (z / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6e-40) || !(y <= 4.1e+53)) {
tmp = y * (x / (t - z));
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6e-40) or not (y <= 4.1e+53): tmp = y * (x / (t - z)) else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6e-40) || !(y <= 4.1e+53)) tmp = Float64(y * Float64(x / Float64(t - z))); else tmp = Float64(x * Float64(z / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6e-40) || ~((y <= 4.1e+53))) tmp = y * (x / (t - z)); else tmp = x * (z / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6e-40], N[Not[LessEqual[y, 4.1e+53]], $MachinePrecision]], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-40} \lor \neg \left(y \leq 4.1 \cdot 10^{+53}\right):\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if y < -6.00000000000000039e-40 or 4.10000000000000018e53 < y Initial program 84.8%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in x around 0 84.8%
*-rgt-identity84.8%
times-frac89.8%
/-rgt-identity89.8%
associate-/r/98.9%
Simplified98.9%
associate-/r/89.8%
Applied egg-rr89.8%
Taylor expanded in y around inf 76.8%
if -6.00000000000000039e-40 < y < 4.10000000000000018e53Initial program 87.4%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in y around 0 70.3%
mul-1-neg70.3%
distribute-neg-frac270.3%
sub-neg70.3%
distribute-neg-in70.3%
remove-double-neg70.3%
+-commutative70.3%
sub-neg70.3%
associate-/l*82.8%
Simplified82.8%
Final simplification80.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8.8e-142) (not (<= z 1.75e-127))) (* x (- 1.0 (/ y z))) (/ x (/ t y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.8e-142) || !(z <= 1.75e-127)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-8.8d-142)) .or. (.not. (z <= 1.75d-127))) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x / (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.8e-142) || !(z <= 1.75e-127)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8.8e-142) or not (z <= 1.75e-127): tmp = x * (1.0 - (y / z)) else: tmp = x / (t / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8.8e-142) || !(z <= 1.75e-127)) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x / Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8.8e-142) || ~((z <= 1.75e-127))) tmp = x * (1.0 - (y / z)); else tmp = x / (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.8e-142], N[Not[LessEqual[z, 1.75e-127]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{-142} \lor \neg \left(z \leq 1.75 \cdot 10^{-127}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\end{array}
\end{array}
if z < -8.80000000000000066e-142 or 1.74999999999999995e-127 < z Initial program 82.0%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t around 0 58.6%
mul-1-neg58.6%
associate-/l*71.5%
distribute-rgt-neg-in71.5%
distribute-frac-neg71.5%
sub-neg71.5%
distribute-neg-in71.5%
remove-double-neg71.5%
+-commutative71.5%
sub-neg71.5%
div-sub71.5%
*-inverses71.5%
Simplified71.5%
if -8.80000000000000066e-142 < z < 1.74999999999999995e-127Initial program 95.3%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in x around 0 95.3%
*-rgt-identity95.3%
times-frac89.4%
/-rgt-identity89.4%
associate-/r/96.4%
Simplified96.4%
Taylor expanded in z around 0 84.7%
Final simplification75.7%
(FPCore (x y z t) :precision binary64 (if (<= z -410000.0) x (if (<= z 2.5e-23) (/ x (/ t y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -410000.0) {
tmp = x;
} else if (z <= 2.5e-23) {
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 <= (-410000.0d0)) then
tmp = x
else if (z <= 2.5d-23) 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 <= -410000.0) {
tmp = x;
} else if (z <= 2.5e-23) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -410000.0: tmp = x elif z <= 2.5e-23: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -410000.0) tmp = x; elseif (z <= 2.5e-23) 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 <= -410000.0) tmp = x; elseif (z <= 2.5e-23) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -410000.0], x, If[LessEqual[z, 2.5e-23], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -410000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.1e5 or 2.5000000000000001e-23 < z Initial program 75.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 62.6%
if -4.1e5 < z < 2.5000000000000001e-23Initial program 95.7%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in x around 0 95.7%
*-rgt-identity95.7%
times-frac92.9%
/-rgt-identity92.9%
associate-/r/97.1%
Simplified97.1%
Taylor expanded in z around 0 66.5%
(FPCore (x y z t) :precision binary64 (if (<= z -20000000.0) x (if (<= z 6.6e-23) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -20000000.0) {
tmp = x;
} else if (z <= 6.6e-23) {
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 <= (-20000000.0d0)) then
tmp = x
else if (z <= 6.6d-23) 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 <= -20000000.0) {
tmp = x;
} else if (z <= 6.6e-23) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -20000000.0: tmp = x elif z <= 6.6e-23: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -20000000.0) tmp = x; elseif (z <= 6.6e-23) 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 <= -20000000.0) tmp = x; elseif (z <= 6.6e-23) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -20000000.0], x, If[LessEqual[z, 6.6e-23], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -20000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-23}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2e7 or 6.60000000000000041e-23 < z Initial program 75.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 62.6%
if -2e7 < z < 6.60000000000000041e-23Initial program 95.7%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in z around 0 63.7%
associate-/l*66.5%
Simplified66.5%
(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.3%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in z around inf 35.4%
(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 2024172
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (/ x (/ (- t z) (- y z))))
(/ (* x (- y z)) (- t z)))