
(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 81.4%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6495.6
Applied rewrites95.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ z (- z t)))))
(if (<= z -1.66e+159)
t_1
(if (<= z 1.4e+204) (* (- y z) (/ x (- t z))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -1.66e+159) {
tmp = t_1;
} else if (z <= 1.4e+204) {
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 * (z / (z - t))
if (z <= (-1.66d+159)) then
tmp = t_1
else if (z <= 1.4d+204) 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 * (z / (z - t));
double tmp;
if (z <= -1.66e+159) {
tmp = t_1;
} else if (z <= 1.4e+204) {
tmp = (y - z) * (x / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z / (z - t)) tmp = 0 if z <= -1.66e+159: tmp = t_1 elif z <= 1.4e+204: tmp = (y - z) * (x / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z / Float64(z - t))) tmp = 0.0 if (z <= -1.66e+159) tmp = t_1; elseif (z <= 1.4e+204) 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 * (z / (z - t)); tmp = 0.0; if (z <= -1.66e+159) tmp = t_1; elseif (z <= 1.4e+204) 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[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.66e+159], t$95$1, If[LessEqual[z, 1.4e+204], N[(N[(y - z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{z - t}\\
\mathbf{if}\;z \leq -1.66 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+204}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.6600000000000001e159 or 1.40000000000000012e204 < z Initial program 55.8%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in y around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6490.7
Applied rewrites90.7%
if -1.6600000000000001e159 < z < 1.40000000000000012e204Initial program 87.2%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6491.0
Applied rewrites91.0%
Final simplification91.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (/ y (- t z))))) (if (<= y -4.8e+64) t_1 (if (<= y 5.7e-16) (* x (/ z (- z t))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (y <= -4.8e+64) {
tmp = t_1;
} else if (y <= 5.7e-16) {
tmp = x * (z / (z - 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 * (y / (t - z))
if (y <= (-4.8d+64)) then
tmp = t_1
else if (y <= 5.7d-16) then
tmp = x * (z / (z - 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 * (y / (t - z));
double tmp;
if (y <= -4.8e+64) {
tmp = t_1;
} else if (y <= 5.7e-16) {
tmp = x * (z / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if y <= -4.8e+64: tmp = t_1 elif y <= 5.7e-16: tmp = x * (z / (z - t)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) tmp = 0.0 if (y <= -4.8e+64) tmp = t_1; elseif (y <= 5.7e-16) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); tmp = 0.0; if (y <= -4.8e+64) tmp = t_1; elseif (y <= 5.7e-16) tmp = x * (z / (z - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+64], t$95$1, If[LessEqual[y, 5.7e-16], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{-16}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.79999999999999999e64 or 5.6999999999999999e-16 < y Initial program 81.9%
Taylor expanded in y around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6482.7
Applied rewrites82.7%
if -4.79999999999999999e64 < y < 5.6999999999999999e-16Initial program 81.0%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6495.4
Applied rewrites95.4%
Taylor expanded in y around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6479.5
Applied rewrites79.5%
(FPCore (x y z t) :precision binary64 (if (<= z -4.9e+27) x (if (<= z 2.2e+73) (* x (/ y (- t z))) (fma x (/ t z) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.9e+27) {
tmp = x;
} else if (z <= 2.2e+73) {
tmp = x * (y / (t - z));
} else {
tmp = fma(x, (t / z), x);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (z <= -4.9e+27) tmp = x; elseif (z <= 2.2e+73) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = fma(x, Float64(t / z), x); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.9e+27], x, If[LessEqual[z, 2.2e+73], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+73}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{t}{z}, x\right)\\
\end{array}
\end{array}
if z < -4.90000000000000015e27Initial program 68.4%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in z around inf
Applied rewrites64.7%
*-lft-identity64.7
Applied rewrites64.7%
if -4.90000000000000015e27 < z < 2.2e73Initial program 91.9%
Taylor expanded in y around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6474.0
Applied rewrites74.0%
if 2.2e73 < z Initial program 61.5%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
Taylor expanded in y around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6478.3
Applied rewrites78.3%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6467.3
Applied rewrites67.3%
(FPCore (x y z t) :precision binary64 (if (<= z -4.5e+15) x (if (<= z 2.7e+65) (* x (/ y t)) (fma x (/ t z) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.5e+15) {
tmp = x;
} else if (z <= 2.7e+65) {
tmp = x * (y / t);
} else {
tmp = fma(x, (t / z), x);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (z <= -4.5e+15) tmp = x; elseif (z <= 2.7e+65) tmp = Float64(x * Float64(y / t)); else tmp = fma(x, Float64(t / z), x); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.5e+15], x, If[LessEqual[z, 2.7e+65], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+65}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{t}{z}, x\right)\\
\end{array}
\end{array}
if z < -4.5e15Initial program 69.5%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in z around inf
Applied rewrites62.7%
*-lft-identity62.7
Applied rewrites62.7%
if -4.5e15 < z < 2.70000000000000019e65Initial program 91.7%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6460.6
Applied rewrites60.6%
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6463.9
Applied rewrites63.9%
if 2.70000000000000019e65 < z Initial program 62.3%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
Taylor expanded in y around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6476.7
Applied rewrites76.7%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6466.0
Applied rewrites66.0%
Final simplification64.0%
(FPCore (x y z t) :precision binary64 (if (<= z -4.5e+15) x (if (<= z 3.4e+65) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.5e+15) {
tmp = x;
} else if (z <= 3.4e+65) {
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 <= (-4.5d+15)) then
tmp = x
else if (z <= 3.4d+65) 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 <= -4.5e+15) {
tmp = x;
} else if (z <= 3.4e+65) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.5e+15: tmp = x elif z <= 3.4e+65: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.5e+15) tmp = x; elseif (z <= 3.4e+65) 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 <= -4.5e+15) tmp = x; elseif (z <= 3.4e+65) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.5e+15], x, If[LessEqual[z, 3.4e+65], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+65}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.5e15 or 3.3999999999999999e65 < z Initial program 66.4%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
Taylor expanded in z around inf
Applied rewrites64.0%
*-lft-identity64.0
Applied rewrites64.0%
if -4.5e15 < z < 3.3999999999999999e65Initial program 91.7%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6460.6
Applied rewrites60.6%
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6463.9
Applied rewrites63.9%
Final simplification64.0%
(FPCore (x y z t) :precision binary64 (if (<= z -4.5e+15) x (if (<= z 1.3e+60) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.5e+15) {
tmp = x;
} else if (z <= 1.3e+60) {
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 <= (-4.5d+15)) then
tmp = x
else if (z <= 1.3d+60) 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 <= -4.5e+15) {
tmp = x;
} else if (z <= 1.3e+60) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.5e+15: tmp = x elif z <= 1.3e+60: tmp = y * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.5e+15) tmp = x; elseif (z <= 1.3e+60) 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 <= -4.5e+15) tmp = x; elseif (z <= 1.3e+60) tmp = y * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.5e+15], x, If[LessEqual[z, 1.3e+60], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+60}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.5e15 or 1.30000000000000004e60 < z Initial program 67.0%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
Taylor expanded in z around inf
Applied rewrites63.0%
*-lft-identity63.0
Applied rewrites63.0%
if -4.5e15 < z < 1.30000000000000004e60Initial program 91.6%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6460.7
Applied rewrites60.7%
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6462.0
Applied rewrites62.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 81.4%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6495.6
Applied rewrites95.6%
Taylor expanded in z around inf
Applied rewrites33.0%
*-lft-identity33.0
Applied rewrites33.0%
(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 2024212
(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)))