
(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 10 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 (/ (- 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}
Initial program 87.1%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around 0 87.1%
*-rgt-identity87.1%
times-frac83.2%
/-rgt-identity83.2%
associate-/r/96.5%
Simplified96.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2300.0) (not (<= z 3.5e-26))) (* x (/ z (- z t))) (/ x (/ (- t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2300.0) || !(z <= 3.5e-26)) {
tmp = x * (z / (z - t));
} else {
tmp = x / ((t - z) / 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 <= (-2300.0d0)) .or. (.not. (z <= 3.5d-26))) then
tmp = x * (z / (z - t))
else
tmp = x / ((t - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2300.0) || !(z <= 3.5e-26)) {
tmp = x * (z / (z - t));
} else {
tmp = x / ((t - z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2300.0) or not (z <= 3.5e-26): tmp = x * (z / (z - t)) else: tmp = x / ((t - z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2300.0) || !(z <= 3.5e-26)) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = Float64(x / Float64(Float64(t - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2300.0) || ~((z <= 3.5e-26))) tmp = x * (z / (z - t)); else tmp = x / ((t - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2300.0], N[Not[LessEqual[z, 3.5e-26]], $MachinePrecision]], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2300 \lor \neg \left(z \leq 3.5 \cdot 10^{-26}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\end{array}
\end{array}
if z < -2300 or 3.49999999999999985e-26 < z Initial program 76.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 58.5%
mul-1-neg58.5%
distribute-neg-frac258.5%
sub-neg58.5%
distribute-neg-in58.5%
remove-double-neg58.5%
+-commutative58.5%
sub-neg58.5%
associate-/l*75.1%
Simplified75.1%
if -2300 < z < 3.49999999999999985e-26Initial program 96.7%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in x around 0 96.7%
*-rgt-identity96.7%
times-frac90.4%
/-rgt-identity90.4%
associate-/r/93.5%
Simplified93.5%
Taylor expanded in y around inf 80.8%
Final simplification78.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 2.3e-25))) (* x (/ z (- z t))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 2.3e-25)) {
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 <= (-1.0d0)) .or. (.not. (z <= 2.3d-25))) 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 <= -1.0) || !(z <= 2.3e-25)) {
tmp = x * (z / (z - t));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 2.3e-25): tmp = x * (z / (z - t)) else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 2.3e-25)) 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 <= -1.0) || ~((z <= 2.3e-25))) 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, -1.0], N[Not[LessEqual[z, 2.3e-25]], $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 -1 \lor \neg \left(z \leq 2.3 \cdot 10^{-25}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -1 or 2.2999999999999999e-25 < z Initial program 76.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 58.5%
mul-1-neg58.5%
distribute-neg-frac258.5%
sub-neg58.5%
distribute-neg-in58.5%
remove-double-neg58.5%
+-commutative58.5%
sub-neg58.5%
associate-/l*75.1%
Simplified75.1%
if -1 < z < 2.2999999999999999e-25Initial program 96.7%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in y around inf 84.5%
associate-/l*80.1%
Simplified80.1%
Final simplification77.8%
(FPCore (x y z t) :precision binary64 (if (<= z -0.0128) (/ x (- (/ (- t) z) -1.0)) (if (<= z 4.2e-24) (/ x (/ (- t z) y)) (* x (/ z (- z t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.0128) {
tmp = x / ((-t / z) - -1.0);
} else if (z <= 4.2e-24) {
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 (z <= (-0.0128d0)) then
tmp = x / ((-t / z) - (-1.0d0))
else if (z <= 4.2d-24) 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 (z <= -0.0128) {
tmp = x / ((-t / z) - -1.0);
} else if (z <= 4.2e-24) {
tmp = x / ((t - z) / y);
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -0.0128: tmp = x / ((-t / z) - -1.0) elif z <= 4.2e-24: tmp = x / ((t - z) / y) else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -0.0128) tmp = Float64(x / Float64(Float64(Float64(-t) / z) - -1.0)); elseif (z <= 4.2e-24) 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 (z <= -0.0128) tmp = x / ((-t / z) - -1.0); elseif (z <= 4.2e-24) tmp = x / ((t - z) / y); else tmp = x * (z / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -0.0128], N[(x / N[(N[((-t) / z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-24], 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}\;z \leq -0.0128:\\
\;\;\;\;\frac{x}{\frac{-t}{z} - -1}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if z < -0.0128000000000000006Initial program 79.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 79.9%
*-rgt-identity79.9%
times-frac72.5%
/-rgt-identity72.5%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around 0 68.2%
mul-1-neg68.2%
div-sub68.3%
sub-neg68.3%
*-inverses68.3%
metadata-eval68.3%
Simplified68.3%
if -0.0128000000000000006 < z < 4.1999999999999999e-24Initial program 96.7%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in x around 0 96.7%
*-rgt-identity96.7%
times-frac90.4%
/-rgt-identity90.4%
associate-/r/93.5%
Simplified93.5%
Taylor expanded in y around inf 80.8%
if 4.1999999999999999e-24 < z Initial program 73.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 57.5%
mul-1-neg57.5%
distribute-neg-frac257.5%
sub-neg57.5%
distribute-neg-in57.5%
remove-double-neg57.5%
+-commutative57.5%
sub-neg57.5%
associate-/l*81.4%
Simplified81.4%
Final simplification78.1%
(FPCore (x y z t) :precision binary64 (if (<= z -5e+71) x (if (<= z 3.6) (* x (/ y (- t z))) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e+71) {
tmp = x;
} else if (z <= 3.6) {
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 <= (-5d+71)) then
tmp = x
else if (z <= 3.6d0) 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 <= -5e+71) {
tmp = x;
} else if (z <= 3.6) {
tmp = x * (y / (t - z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5e+71: tmp = x elif z <= 3.6: tmp = x * (y / (t - z)) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5e+71) tmp = x; elseif (z <= 3.6) 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 <= -5e+71) tmp = x; elseif (z <= 3.6) tmp = x * (y / (t - z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5e+71], x, If[LessEqual[z, 3.6], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.6:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.99999999999999972e71 or 3.60000000000000009 < z Initial program 72.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.3%
if -4.99999999999999972e71 < z < 3.60000000000000009Initial program 96.5%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in y around inf 79.2%
associate-/l*75.9%
Simplified75.9%
(FPCore (x y z t) :precision binary64 (if (<= z -9e-49) x (if (<= z 3.4) (/ (* x y) t) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9e-49) {
tmp = x;
} else if (z <= 3.4) {
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 <= (-9d-49)) then
tmp = x
else if (z <= 3.4d0) 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 <= -9e-49) {
tmp = x;
} else if (z <= 3.4) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -9e-49: tmp = x elif z <= 3.4: tmp = (x * y) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -9e-49) tmp = x; elseif (z <= 3.4) 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 <= -9e-49) tmp = x; elseif (z <= 3.4) tmp = (x * y) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -9e-49], x, If[LessEqual[z, 3.4], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-49}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.4:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.0000000000000004e-49 or 3.39999999999999991 < z Initial program 76.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.1%
if -9.0000000000000004e-49 < z < 3.39999999999999991Initial program 97.3%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in z around 0 73.5%
(FPCore (x y z t) :precision binary64 (if (<= z -2.2e+60) x (if (<= z 3.5) (/ x (/ t y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.2e+60) {
tmp = x;
} else if (z <= 3.5) {
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 <= (-2.2d+60)) then
tmp = x
else if (z <= 3.5d0) 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 <= -2.2e+60) {
tmp = x;
} else if (z <= 3.5) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.2e+60: tmp = x elif z <= 3.5: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.2e+60) tmp = x; elseif (z <= 3.5) 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 <= -2.2e+60) tmp = x; elseif (z <= 3.5) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.2e+60], x, If[LessEqual[z, 3.5], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.5:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.19999999999999996e60 or 3.5 < z Initial program 73.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.1%
if -2.19999999999999996e60 < z < 3.5Initial program 96.4%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in x around 0 96.4%
*-rgt-identity96.4%
times-frac91.2%
/-rgt-identity91.2%
associate-/r/94.3%
Simplified94.3%
Taylor expanded in z around 0 65.1%
(FPCore (x y z t) :precision binary64 (if (<= z -1.16e+60) x (if (<= z 3.4) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.16e+60) {
tmp = x;
} else if (z <= 3.4) {
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 <= (-1.16d+60)) then
tmp = x
else if (z <= 3.4d0) 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 <= -1.16e+60) {
tmp = x;
} else if (z <= 3.4) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.16e+60: tmp = x elif z <= 3.4: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.16e+60) tmp = x; elseif (z <= 3.4) 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 <= -1.16e+60) tmp = x; elseif (z <= 3.4) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.16e+60], x, If[LessEqual[z, 3.4], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.4:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.15999999999999996e60 or 3.39999999999999991 < z Initial program 73.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.1%
if -1.15999999999999996e60 < z < 3.39999999999999991Initial program 96.4%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in z around 0 65.7%
associate-/l*64.8%
Simplified64.8%
(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 87.1%
associate-/l*96.2%
Simplified96.2%
(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 87.1%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in z around inf 31.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 2024138
(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)))