
(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 8 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.9%
associate-/l*98.3%
Simplified98.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (- y z) t))))
(if (<= t -3.5e+145)
t_1
(if (<= t -9.5e-16)
(* x (/ z (- z t)))
(if (or (<= t -1.3e-64) (not (<= t 1.32e-67)))
t_1
(* x (- 1.0 (/ y z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y - z) / t);
double tmp;
if (t <= -3.5e+145) {
tmp = t_1;
} else if (t <= -9.5e-16) {
tmp = x * (z / (z - t));
} else if ((t <= -1.3e-64) || !(t <= 1.32e-67)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * ((y - z) / t)
if (t <= (-3.5d+145)) then
tmp = t_1
else if (t <= (-9.5d-16)) then
tmp = x * (z / (z - t))
else if ((t <= (-1.3d-64)) .or. (.not. (t <= 1.32d-67))) then
tmp = t_1
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 t_1 = x * ((y - z) / t);
double tmp;
if (t <= -3.5e+145) {
tmp = t_1;
} else if (t <= -9.5e-16) {
tmp = x * (z / (z - t));
} else if ((t <= -1.3e-64) || !(t <= 1.32e-67)) {
tmp = t_1;
} else {
tmp = x * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y - z) / t) tmp = 0 if t <= -3.5e+145: tmp = t_1 elif t <= -9.5e-16: tmp = x * (z / (z - t)) elif (t <= -1.3e-64) or not (t <= 1.32e-67): tmp = t_1 else: tmp = x * (1.0 - (y / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (t <= -3.5e+145) tmp = t_1; elseif (t <= -9.5e-16) tmp = Float64(x * Float64(z / Float64(z - t))); elseif ((t <= -1.3e-64) || !(t <= 1.32e-67)) tmp = t_1; else tmp = Float64(x * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y - z) / t); tmp = 0.0; if (t <= -3.5e+145) tmp = t_1; elseif (t <= -9.5e-16) tmp = x * (z / (z - t)); elseif ((t <= -1.3e-64) || ~((t <= 1.32e-67))) tmp = t_1; else tmp = x * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e+145], t$95$1, If[LessEqual[t, -9.5e-16], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.3e-64], N[Not[LessEqual[t, 1.32e-67]], $MachinePrecision]], t$95$1, N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-16}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-64} \lor \neg \left(t \leq 1.32 \cdot 10^{-67}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if t < -3.5000000000000001e145 or -9.5000000000000005e-16 < t < -1.3e-64 or 1.3199999999999999e-67 < t Initial program 85.1%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in t around inf 73.8%
associate-/l*80.8%
Simplified80.8%
if -3.5000000000000001e145 < t < -9.5000000000000005e-16Initial program 81.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around 0 54.5%
mul-1-neg54.5%
distribute-neg-frac254.5%
neg-sub054.5%
associate--r-54.5%
neg-sub054.5%
+-commutative54.5%
sub-neg54.5%
associate-/l*72.8%
Simplified72.8%
if -1.3e-64 < t < 1.3199999999999999e-67Initial program 88.7%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in t around 0 78.9%
mul-1-neg78.9%
associate-/l*89.0%
distribute-rgt-neg-in89.0%
distribute-frac-neg89.0%
neg-sub089.0%
associate--r-89.0%
neg-sub089.0%
+-commutative89.0%
sub-neg89.0%
div-sub89.0%
*-inverses89.0%
Simplified89.0%
Final simplification82.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.72e-40) (not (<= y 4.3e+14))) (/ (* x y) (- t z)) (* x (/ z (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.72e-40) || !(y <= 4.3e+14)) {
tmp = (x * y) / (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 <= (-1.72d-40)) .or. (.not. (y <= 4.3d+14))) then
tmp = (x * y) / (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 <= -1.72e-40) || !(y <= 4.3e+14)) {
tmp = (x * y) / (t - z);
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.72e-40) or not (y <= 4.3e+14): tmp = (x * y) / (t - z) else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.72e-40) || !(y <= 4.3e+14)) tmp = Float64(Float64(x * y) / 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 <= -1.72e-40) || ~((y <= 4.3e+14))) tmp = (x * y) / (t - z); else tmp = x * (z / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.72e-40], N[Not[LessEqual[y, 4.3e+14]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.72 \cdot 10^{-40} \lor \neg \left(y \leq 4.3 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{x \cdot y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if y < -1.7199999999999999e-40 or 4.3e14 < y Initial program 87.6%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in y around inf 75.9%
if -1.7199999999999999e-40 < y < 4.3e14Initial program 84.1%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in y around 0 70.5%
mul-1-neg70.5%
distribute-neg-frac270.5%
neg-sub070.5%
associate--r-70.5%
neg-sub070.5%
+-commutative70.5%
sub-neg70.5%
associate-/l*83.9%
Simplified83.9%
Final simplification79.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.5e-30) (not (<= z 7.5e-77))) (* x (/ z (- z t))) (* x (/ y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.5e-30) || !(z <= 7.5e-77)) {
tmp = x * (z / (z - t));
} 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 ((z <= (-3.5d-30)) .or. (.not. (z <= 7.5d-77))) then
tmp = x * (z / (z - t))
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 ((z <= -3.5e-30) || !(z <= 7.5e-77)) {
tmp = x * (z / (z - t));
} else {
tmp = x * (y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.5e-30) or not (z <= 7.5e-77): tmp = x * (z / (z - t)) else: tmp = x * (y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.5e-30) || !(z <= 7.5e-77)) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = Float64(x * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.5e-30) || ~((z <= 7.5e-77))) tmp = x * (z / (z - t)); else tmp = x * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.5e-30], N[Not[LessEqual[z, 7.5e-77]], $MachinePrecision]], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-30} \lor \neg \left(z \leq 7.5 \cdot 10^{-77}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\end{array}
\end{array}
if z < -3.5000000000000003e-30 or 7.5000000000000006e-77 < z Initial program 79.1%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in y around 0 58.4%
mul-1-neg58.4%
distribute-neg-frac258.4%
neg-sub058.4%
associate--r-58.4%
neg-sub058.4%
+-commutative58.4%
sub-neg58.4%
associate-/l*74.6%
Simplified74.6%
if -3.5000000000000003e-30 < z < 7.5000000000000006e-77Initial program 95.5%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around 0 66.8%
associate-/l*69.5%
Simplified69.5%
Final simplification72.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.7e-64) (not (<= z 1.15e-55))) (* x (- 1.0 (/ y z))) (* x (/ y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.7e-64) || !(z <= 1.15e-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 ((z <= (-3.7d-64)) .or. (.not. (z <= 1.15d-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 ((z <= -3.7e-64) || !(z <= 1.15e-55)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.7e-64) or not (z <= 1.15e-55): tmp = x * (1.0 - (y / z)) else: tmp = x * (y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.7e-64) || !(z <= 1.15e-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 ((z <= -3.7e-64) || ~((z <= 1.15e-55))) tmp = x * (1.0 - (y / z)); else tmp = x * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.7e-64], N[Not[LessEqual[z, 1.15e-55]], $MachinePrecision]], 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}\;z \leq -3.7 \cdot 10^{-64} \lor \neg \left(z \leq 1.15 \cdot 10^{-55}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\end{array}
\end{array}
if z < -3.69999999999999999e-64 or 1.15000000000000006e-55 < z Initial program 79.5%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t around 0 50.3%
mul-1-neg50.3%
associate-/l*64.4%
distribute-rgt-neg-in64.4%
distribute-frac-neg64.4%
neg-sub064.4%
associate--r-64.4%
neg-sub064.4%
+-commutative64.4%
sub-neg64.4%
div-sub64.4%
*-inverses64.4%
Simplified64.4%
if -3.69999999999999999e-64 < z < 1.15000000000000006e-55Initial program 95.4%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around 0 67.2%
associate-/l*69.9%
Simplified69.9%
Final simplification66.6%
(FPCore (x y z t) :precision binary64 (if (<= y -2.35e-40) (/ (* x y) (- t z)) (if (<= y 4.4e+17) (* x (/ z (- z t))) (* y (/ x (- t z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.35e-40) {
tmp = (x * y) / (t - z);
} else if (y <= 4.4e+17) {
tmp = x * (z / (z - t));
} else {
tmp = y * (x / (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.35d-40)) then
tmp = (x * y) / (t - z)
else if (y <= 4.4d+17) then
tmp = x * (z / (z - t))
else
tmp = y * (x / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.35e-40) {
tmp = (x * y) / (t - z);
} else if (y <= 4.4e+17) {
tmp = x * (z / (z - t));
} else {
tmp = y * (x / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.35e-40: tmp = (x * y) / (t - z) elif y <= 4.4e+17: tmp = x * (z / (z - t)) else: tmp = y * (x / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.35e-40) tmp = Float64(Float64(x * y) / Float64(t - z)); elseif (y <= 4.4e+17) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = Float64(y * Float64(x / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.35e-40) tmp = (x * y) / (t - z); elseif (y <= 4.4e+17) tmp = x * (z / (z - t)); else tmp = y * (x / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.35e-40], N[(N[(x * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+17], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{-40}:\\
\;\;\;\;\frac{x \cdot y}{t - z}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\end{array}
\end{array}
if y < -2.35e-40Initial program 91.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 78.3%
if -2.35e-40 < y < 4.4e17Initial program 84.1%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in y around 0 70.5%
mul-1-neg70.5%
distribute-neg-frac270.5%
neg-sub070.5%
associate--r-70.5%
neg-sub070.5%
+-commutative70.5%
sub-neg70.5%
associate-/l*83.9%
Simplified83.9%
if 4.4e17 < y Initial program 83.6%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in x around 0 83.6%
remove-double-neg83.6%
distribute-neg-frac283.6%
*-commutative83.6%
associate-/l*89.4%
distribute-lft-neg-out89.4%
neg-sub089.4%
associate--r-89.4%
neg-sub089.4%
+-commutative89.4%
sub-neg89.4%
neg-sub089.4%
associate--r-89.4%
neg-sub089.4%
+-commutative89.4%
sub-neg89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in y around inf 73.4%
mul-1-neg73.4%
associate-*l/76.2%
distribute-rgt-neg-out76.2%
Simplified76.2%
Final simplification80.5%
(FPCore (x y z t) :precision binary64 (if (<= z -1.2e+61) x (if (<= z 2.5e+101) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.2e+61) {
tmp = x;
} else if (z <= 2.5e+101) {
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.2d+61)) then
tmp = x
else if (z <= 2.5d+101) 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.2e+61) {
tmp = x;
} else if (z <= 2.5e+101) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.2e+61: tmp = x elif z <= 2.5e+101: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.2e+61) tmp = x; elseif (z <= 2.5e+101) 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.2e+61) tmp = x; elseif (z <= 2.5e+101) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.2e+61], x, If[LessEqual[z, 2.5e+101], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+101}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.1999999999999999e61 or 2.49999999999999994e101 < z Initial program 66.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 68.7%
if -1.1999999999999999e61 < z < 2.49999999999999994e101Initial program 95.5%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in z around 0 53.2%
associate-/l*56.0%
Simplified56.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 85.9%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 31.7%
(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 2024086
(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)))