
(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 86.4%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.2%
Applied egg-rr97.2%
clear-numN/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.4%
Applied egg-rr97.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -2.15e+199)
t_1
(if (<= z 2.2e+227) (* (- y z) (/ x (- t z))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -2.15e+199) {
tmp = t_1;
} else if (z <= 2.2e+227) {
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 - (y / z))
if (z <= (-2.15d+199)) then
tmp = t_1
else if (z <= 2.2d+227) 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 - (y / z));
double tmp;
if (z <= -2.15e+199) {
tmp = t_1;
} else if (z <= 2.2e+227) {
tmp = (y - z) * (x / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -2.15e+199: tmp = t_1 elif z <= 2.2e+227: 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(y / z))) tmp = 0.0 if (z <= -2.15e+199) tmp = t_1; elseif (z <= 2.2e+227) 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 - (y / z)); tmp = 0.0; if (z <= -2.15e+199) tmp = t_1; elseif (z <= 2.2e+227) 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[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e+199], t$95$1, If[LessEqual[z, 2.2e+227], 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 \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{+199}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+227}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.15000000000000007e199 or 2.2000000000000002e227 < z Initial program 67.6%
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-/.f6490.5%
Simplified90.5%
if -2.15000000000000007e199 < z < 2.2000000000000002e227Initial program 89.9%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6493.4%
Applied egg-rr93.4%
Final simplification92.9%
(FPCore (x y z t) :precision binary64 (if (<= t -5.3e-83) (* x (/ (- y z) t)) (if (<= t 1.05e+26) (* x (- 1.0 (/ y z))) (/ x (/ t (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.3e-83) {
tmp = x * ((y - z) / t);
} else if (t <= 1.05e+26) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / (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 <= (-5.3d-83)) then
tmp = x * ((y - z) / t)
else if (t <= 1.05d+26) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x / (t / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.3e-83) {
tmp = x * ((y - z) / t);
} else if (t <= 1.05e+26) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5.3e-83: tmp = x * ((y - z) / t) elif t <= 1.05e+26: tmp = x * (1.0 - (y / z)) else: tmp = x / (t / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5.3e-83) tmp = Float64(x * Float64(Float64(y - z) / t)); elseif (t <= 1.05e+26) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x / Float64(t / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -5.3e-83) tmp = x * ((y - z) / t); elseif (t <= 1.05e+26) tmp = x * (1.0 - (y / z)); else tmp = x / (t / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.3e-83], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+26], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.3 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\end{array}
\end{array}
if t < -5.3e-83Initial program 92.9%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.6%
Simplified77.6%
if -5.3e-83 < t < 1.05e26Initial program 84.7%
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-/.f6482.0%
Simplified82.0%
if 1.05e26 < t Initial program 79.8%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.6%
Simplified79.6%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.6%
Applied egg-rr79.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (/ (- y z) t)))) (if (<= t -3.6e-83) t_1 (if (<= t 1.02e+24) (* 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 <= -3.6e-83) {
tmp = t_1;
} else if (t <= 1.02e+24) {
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 <= (-3.6d-83)) then
tmp = t_1
else if (t <= 1.02d+24) 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 <= -3.6e-83) {
tmp = t_1;
} else if (t <= 1.02e+24) {
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 <= -3.6e-83: tmp = t_1 elif t <= 1.02e+24: 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 <= -3.6e-83) tmp = t_1; elseif (t <= 1.02e+24) 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 <= -3.6e-83) tmp = t_1; elseif (t <= 1.02e+24) 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, -3.6e-83], t$95$1, If[LessEqual[t, 1.02e+24], 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 -3.6 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.60000000000000012e-83 or 1.02000000000000004e24 < t Initial program 87.8%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.4%
Simplified78.4%
if -3.60000000000000012e-83 < t < 1.02000000000000004e24Initial program 84.7%
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-/.f6482.0%
Simplified82.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (- 1.0 (/ y z))))) (if (<= z -1.32e-25) t_1 (if (<= z 0.032) (* y (/ x 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.32e-25) {
tmp = t_1;
} else if (z <= 0.032) {
tmp = y * (x / 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.32d-25)) then
tmp = t_1
else if (z <= 0.032d0) then
tmp = y * (x / 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.32e-25) {
tmp = t_1;
} else if (z <= 0.032) {
tmp = y * (x / 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.32e-25: tmp = t_1 elif z <= 0.032: tmp = y * (x / 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.32e-25) tmp = t_1; elseif (z <= 0.032) tmp = Float64(y * Float64(x / 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.32e-25) tmp = t_1; elseif (z <= 0.032) tmp = y * (x / 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.32e-25], t$95$1, If[LessEqual[z, 0.032], N[(y * N[(x / 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.32 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.032:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3199999999999999e-25 or 0.032000000000000001 < z Initial program 79.5%
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-/.f6472.3%
Simplified72.3%
if -1.3199999999999999e-25 < z < 0.032000000000000001Initial program 95.1%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6481.7%
Simplified81.7%
Taylor expanded in y around inf
Simplified70.7%
associate-*r/N/A
associate-*l/N/A
*-lowering-*.f64N/A
/-lowering-/.f6470.7%
Applied egg-rr70.7%
Final simplification71.6%
(FPCore (x y z t) :precision binary64 (if (<= z -6.4e+22) x (if (<= z 5.5e+22) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.4e+22) {
tmp = x;
} else if (z <= 5.5e+22) {
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 <= (-6.4d+22)) then
tmp = x
else if (z <= 5.5d+22) 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 <= -6.4e+22) {
tmp = x;
} else if (z <= 5.5e+22) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.4e+22: tmp = x elif z <= 5.5e+22: tmp = y * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.4e+22) tmp = x; elseif (z <= 5.5e+22) 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 <= -6.4e+22) tmp = x; elseif (z <= 5.5e+22) tmp = y * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.4e+22], x, If[LessEqual[z, 5.5e+22], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+22}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.4e22 or 5.50000000000000021e22 < z Initial program 77.3%
Taylor expanded in z around inf
Simplified59.6%
if -6.4e22 < z < 5.50000000000000021e22Initial program 95.6%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.5%
Simplified78.5%
Taylor expanded in y around inf
Simplified65.4%
associate-*r/N/A
associate-*l/N/A
*-lowering-*.f64N/A
/-lowering-/.f6465.4%
Applied egg-rr65.4%
Final simplification62.5%
(FPCore (x y z t) :precision binary64 (if (<= z -1e+21) x (if (<= z 1.95e+24) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1e+21) {
tmp = x;
} else if (z <= 1.95e+24) {
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 <= (-1d+21)) then
tmp = x
else if (z <= 1.95d+24) 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 <= -1e+21) {
tmp = x;
} else if (z <= 1.95e+24) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1e+21: tmp = x elif z <= 1.95e+24: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1e+21) tmp = x; elseif (z <= 1.95e+24) 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 <= -1e+21) tmp = x; elseif (z <= 1.95e+24) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1e+21], x, If[LessEqual[z, 1.95e+24], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+21}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1e21 or 1.9499999999999999e24 < z Initial program 77.3%
Taylor expanded in z around inf
Simplified59.6%
if -1e21 < z < 1.9499999999999999e24Initial program 95.6%
Taylor expanded in t around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.5%
Simplified78.5%
Taylor expanded in y around inf
Simplified65.4%
(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.4%
Taylor expanded in z around inf
Simplified35.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 2024160
(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)))