
(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 (* (/ (- y z) (- t z)) x))
double code(double x, double y, double z, double t) {
return ((y - z) / (t - z)) * 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 = ((y - z) / (t - z)) * x
end function
public static double code(double x, double y, double z, double t) {
return ((y - z) / (t - z)) * x;
}
def code(x, y, z, t): return ((y - z) / (t - z)) * x
function code(x, y, z, t) return Float64(Float64(Float64(y - z) / Float64(t - z)) * x) end
function tmp = code(x, y, z, t) tmp = ((y - z) / (t - z)) * x; end
code[x_, y_, z_, t_] := N[(N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\frac{y - z}{t - z} \cdot x
\end{array}
Initial program 82.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.3%
Applied egg-rr98.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (- 1.0 (/ t z)))))
(if (<= z -5.6e+122)
t_1
(if (<= z 8.8e+220) (* (- y z) (/ x (- t z))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x / (1.0 - (t / z));
double tmp;
if (z <= -5.6e+122) {
tmp = t_1;
} else if (z <= 8.8e+220) {
tmp = (y - z) * (x / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - (t / z))
if (z <= (-5.6d+122)) then
tmp = t_1
else if (z <= 8.8d+220) then
tmp = (y - z) * (x / (t - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (1.0 - (t / z));
double tmp;
if (z <= -5.6e+122) {
tmp = t_1;
} else if (z <= 8.8e+220) {
tmp = (y - z) * (x / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (1.0 - (t / z)) tmp = 0 if z <= -5.6e+122: tmp = t_1 elif z <= 8.8e+220: tmp = (y - z) * (x / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(1.0 - Float64(t / z))) tmp = 0.0 if (z <= -5.6e+122) tmp = t_1; elseif (z <= 8.8e+220) tmp = Float64(Float64(y - z) * Float64(x / Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (1.0 - (t / z)); tmp = 0.0; if (z <= -5.6e+122) tmp = t_1; elseif (z <= 8.8e+220) tmp = (y - z) * (x / (t - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+122], t$95$1, If[LessEqual[z, 8.8e+220], N[(N[(y - z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - \frac{t}{z}}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+220}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.5999999999999999e122 or 8.79999999999999957e220 < z Initial program 55.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in y around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6498.1%
Simplified98.1%
/-lowering-/.f64N/A
associate--r+N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
/-lowering-/.f6498.1%
Applied egg-rr98.1%
if -5.5999999999999999e122 < z < 8.79999999999999957e220Initial program 89.1%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.8%
Applied egg-rr94.8%
Final simplification95.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (- 1.0 (/ t z)))))
(if (<= z -9600000000.0)
t_1
(if (<= z 720000000000.0) (* x (/ y (- t z))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x / (1.0 - (t / z));
double tmp;
if (z <= -9600000000.0) {
tmp = t_1;
} else if (z <= 720000000000.0) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - (t / z))
if (z <= (-9600000000.0d0)) then
tmp = t_1
else if (z <= 720000000000.0d0) then
tmp = x * (y / (t - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (1.0 - (t / z));
double tmp;
if (z <= -9600000000.0) {
tmp = t_1;
} else if (z <= 720000000000.0) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (1.0 - (t / z)) tmp = 0 if z <= -9600000000.0: tmp = t_1 elif z <= 720000000000.0: tmp = x * (y / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(1.0 - Float64(t / z))) tmp = 0.0 if (z <= -9600000000.0) tmp = t_1; elseif (z <= 720000000000.0) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (1.0 - (t / z)); tmp = 0.0; if (z <= -9600000000.0) tmp = t_1; elseif (z <= 720000000000.0) tmp = x * (y / (t - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9600000000.0], t$95$1, If[LessEqual[z, 720000000000.0], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - \frac{t}{z}}\\
\mathbf{if}\;z \leq -9600000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 720000000000:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.6e9 or 7.2e11 < z Initial program 70.4%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
Taylor expanded in y around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6481.6%
Simplified81.6%
/-lowering-/.f64N/A
associate--r+N/A
metadata-evalN/A
metadata-evalN/A
--lowering--.f64N/A
metadata-evalN/A
/-lowering-/.f6481.6%
Applied egg-rr81.6%
if -9.6e9 < z < 7.2e11Initial program 92.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.9%
Applied egg-rr96.9%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6479.2%
Simplified79.2%
Final simplification80.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (/ (- y z) t)))) (if (<= t -370000.0) t_1 (if (<= t 3e+63) (* x (- 1.0 (/ y z))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y - z) / t);
double tmp;
if (t <= -370000.0) {
tmp = t_1;
} else if (t <= 3e+63) {
tmp = x * (1.0 - (y / z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((y - z) / t)
if (t <= (-370000.0d0)) then
tmp = t_1
else if (t <= 3d+63) then
tmp = x * (1.0d0 - (y / z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y - z) / t);
double tmp;
if (t <= -370000.0) {
tmp = t_1;
} else if (t <= 3e+63) {
tmp = x * (1.0 - (y / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y - z) / t) tmp = 0 if t <= -370000.0: tmp = t_1 elif t <= 3e+63: tmp = x * (1.0 - (y / z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (t <= -370000.0) tmp = t_1; elseif (t <= 3e+63) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y - z) / t); tmp = 0.0; if (t <= -370000.0) tmp = t_1; elseif (t <= 3e+63) tmp = x * (1.0 - (y / z)); else tmp = t_1; 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, -370000.0], t$95$1, If[LessEqual[t, 3e+63], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -370000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+63}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.7e5 or 2.99999999999999999e63 < t Initial program 81.0%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.6%
Simplified78.6%
if -3.7e5 < t < 2.99999999999999999e63Initial program 83.2%
Taylor expanded in t around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6479.6%
Simplified79.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (- 1.0 (/ y z))))) (if (<= z -1.1e-38) t_1 (if (<= z 1.5e-115) (* x (/ y t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.1e-38) {
tmp = t_1;
} else if (z <= 1.5e-115) {
tmp = x * (y / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / z))
if (z <= (-1.1d-38)) then
tmp = t_1
else if (z <= 1.5d-115) then
tmp = x * (y / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.1e-38) {
tmp = t_1;
} else if (z <= 1.5e-115) {
tmp = x * (y / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -1.1e-38: tmp = t_1 elif z <= 1.5e-115: tmp = x * (y / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.1e-38) tmp = t_1; elseif (z <= 1.5e-115) tmp = Float64(x * Float64(y / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.1e-38) tmp = t_1; elseif (z <= 1.5e-115) tmp = x * (y / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e-38], t$95$1, If[LessEqual[z, 1.5e-115], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-115}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.10000000000000004e-38 or 1.5000000000000001e-115 < z Initial program 75.0%
Taylor expanded in t around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6467.1%
Simplified67.1%
if -1.10000000000000004e-38 < z < 1.5000000000000001e-115Initial program 94.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.1%
Applied egg-rr97.1%
Taylor expanded in z around 0
/-lowering-/.f6476.7%
Simplified76.7%
Final simplification70.6%
(FPCore (x y z t) :precision binary64 (if (<= z -3.9e+23) x (if (<= z 1.18e+111) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.9e+23) {
tmp = x;
} else if (z <= 1.18e+111) {
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 <= (-3.9d+23)) then
tmp = x
else if (z <= 1.18d+111) 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 <= -3.9e+23) {
tmp = x;
} else if (z <= 1.18e+111) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.9e+23: tmp = x elif z <= 1.18e+111: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.9e+23) tmp = x; elseif (z <= 1.18e+111) 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 <= -3.9e+23) tmp = x; elseif (z <= 1.18e+111) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.9e+23], x, If[LessEqual[z, 1.18e+111], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.18 \cdot 10^{+111}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.9e23 or 1.1799999999999999e111 < z Initial program 64.7%
Taylor expanded in z around inf
Simplified71.4%
if -3.9e23 < z < 1.1799999999999999e111Initial program 91.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.5%
Applied egg-rr97.5%
Taylor expanded in z around 0
/-lowering-/.f6458.5%
Simplified58.5%
Final simplification63.1%
(FPCore (x y z t) :precision binary64 (if (<= z -5.3e+23) x (if (<= z 2.7e+111) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.3e+23) {
tmp = x;
} else if (z <= 2.7e+111) {
tmp = y * (x / 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.3d+23)) then
tmp = x
else if (z <= 2.7d+111) then
tmp = y * (x / 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.3e+23) {
tmp = x;
} else if (z <= 2.7e+111) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.3e+23: tmp = x elif z <= 2.7e+111: tmp = y * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.3e+23) tmp = x; elseif (z <= 2.7e+111) tmp = Float64(y * Float64(x / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5.3e+23) tmp = x; elseif (z <= 2.7e+111) tmp = y * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.3e+23], x, If[LessEqual[z, 2.7e+111], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.3 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+111}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.3000000000000001e23 or 2.6999999999999999e111 < z Initial program 64.7%
Taylor expanded in z around inf
Simplified71.4%
if -5.3000000000000001e23 < z < 2.6999999999999999e111Initial program 91.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.5%
Applied egg-rr97.5%
Taylor expanded in z around 0
/-lowering-/.f6458.5%
Simplified58.5%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6455.7%
Applied egg-rr55.7%
(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 82.2%
Taylor expanded in z around inf
Simplified33.3%
(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 2024155
(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)))