
(FPCore (x y z t) :precision binary64 (+ (- (* (/ 1.0 8.0) x) (/ (* y z) 2.0)) t))
double code(double x, double y, double z, double t) {
return (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t;
}
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 = (((1.0d0 / 8.0d0) * x) - ((y * z) / 2.0d0)) + t
end function
public static double code(double x, double y, double z, double t) {
return (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t;
}
def code(x, y, z, t): return (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(1.0 / 8.0) * x) - Float64(Float64(y * z) / 2.0)) + t) end
function tmp = code(x, y, z, t) tmp = (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(1.0 / 8.0), $MachinePrecision] * x), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- (* (/ 1.0 8.0) x) (/ (* y z) 2.0)) t))
double code(double x, double y, double z, double t) {
return (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t;
}
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 = (((1.0d0 / 8.0d0) * x) - ((y * z) / 2.0d0)) + t
end function
public static double code(double x, double y, double z, double t) {
return (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t;
}
def code(x, y, z, t): return (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(1.0 / 8.0) * x) - Float64(Float64(y * z) / 2.0)) + t) end
function tmp = code(x, y, z, t) tmp = (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(1.0 / 8.0), $MachinePrecision] * x), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t
\end{array}
(FPCore (x y z t) :precision binary64 (fma (/ z -2.0) y (+ (* 0.125 x) t)))
double code(double x, double y, double z, double t) {
return fma((z / -2.0), y, ((0.125 * x) + t));
}
function code(x, y, z, t) return fma(Float64(z / -2.0), y, Float64(Float64(0.125 * x) + t)) end
code[x_, y_, z_, t_] := N[(N[(z / -2.0), $MachinePrecision] * y + N[(N[(0.125 * x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z}{-2}, y, 0.125 \cdot x + t\right)
\end{array}
Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
associate-+r+N/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
fma-defineN/A
fma-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (* z y) -0.5)))
(if (<= (* z y) -1.2e+141)
t_1
(if (<= (* z y) -1.7e+18)
t
(if (<= (* z y) 9e-63) (* 0.125 x) (if (<= (* z y) 3.4e+91) t t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * y) * -0.5;
double tmp;
if ((z * y) <= -1.2e+141) {
tmp = t_1;
} else if ((z * y) <= -1.7e+18) {
tmp = t;
} else if ((z * y) <= 9e-63) {
tmp = 0.125 * x;
} else if ((z * y) <= 3.4e+91) {
tmp = 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 = (z * y) * (-0.5d0)
if ((z * y) <= (-1.2d+141)) then
tmp = t_1
else if ((z * y) <= (-1.7d+18)) then
tmp = t
else if ((z * y) <= 9d-63) then
tmp = 0.125d0 * x
else if ((z * y) <= 3.4d+91) then
tmp = 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 = (z * y) * -0.5;
double tmp;
if ((z * y) <= -1.2e+141) {
tmp = t_1;
} else if ((z * y) <= -1.7e+18) {
tmp = t;
} else if ((z * y) <= 9e-63) {
tmp = 0.125 * x;
} else if ((z * y) <= 3.4e+91) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * y) * -0.5 tmp = 0 if (z * y) <= -1.2e+141: tmp = t_1 elif (z * y) <= -1.7e+18: tmp = t elif (z * y) <= 9e-63: tmp = 0.125 * x elif (z * y) <= 3.4e+91: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * y) * -0.5) tmp = 0.0 if (Float64(z * y) <= -1.2e+141) tmp = t_1; elseif (Float64(z * y) <= -1.7e+18) tmp = t; elseif (Float64(z * y) <= 9e-63) tmp = Float64(0.125 * x); elseif (Float64(z * y) <= 3.4e+91) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * y) * -0.5; tmp = 0.0; if ((z * y) <= -1.2e+141) tmp = t_1; elseif ((z * y) <= -1.7e+18) tmp = t; elseif ((z * y) <= 9e-63) tmp = 0.125 * x; elseif ((z * y) <= 3.4e+91) tmp = t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[N[(z * y), $MachinePrecision], -1.2e+141], t$95$1, If[LessEqual[N[(z * y), $MachinePrecision], -1.7e+18], t, If[LessEqual[N[(z * y), $MachinePrecision], 9e-63], N[(0.125 * x), $MachinePrecision], If[LessEqual[N[(z * y), $MachinePrecision], 3.4e+91], t, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot -0.5\\
\mathbf{if}\;z \cdot y \leq -1.2 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot y \leq -1.7 \cdot 10^{+18}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \cdot y \leq 9 \cdot 10^{-63}:\\
\;\;\;\;0.125 \cdot x\\
\mathbf{elif}\;z \cdot y \leq 3.4 \cdot 10^{+91}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 y z) < -1.19999999999999999e141 or 3.4000000000000001e91 < (*.f64 y z) Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-lowering-*.f6483.8%
Simplified83.8%
if -1.19999999999999999e141 < (*.f64 y z) < -1.7e18 or 8.9999999999999999e-63 < (*.f64 y z) < 3.4000000000000001e91Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around inf
Simplified55.6%
if -1.7e18 < (*.f64 y z) < 8.9999999999999999e-63Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf
*-lowering-*.f6453.1%
Simplified53.1%
Final simplification63.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ t (* (* z y) -0.5))))
(if (<= (* z y) -5e+159)
t_1
(if (<= (* z y) 5e+89) (- t (* x -0.125)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = t + ((z * y) * -0.5);
double tmp;
if ((z * y) <= -5e+159) {
tmp = t_1;
} else if ((z * y) <= 5e+89) {
tmp = t - (x * -0.125);
} 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 = t + ((z * y) * (-0.5d0))
if ((z * y) <= (-5d+159)) then
tmp = t_1
else if ((z * y) <= 5d+89) then
tmp = t - (x * (-0.125d0))
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 = t + ((z * y) * -0.5);
double tmp;
if ((z * y) <= -5e+159) {
tmp = t_1;
} else if ((z * y) <= 5e+89) {
tmp = t - (x * -0.125);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t + ((z * y) * -0.5) tmp = 0 if (z * y) <= -5e+159: tmp = t_1 elif (z * y) <= 5e+89: tmp = t - (x * -0.125) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t + Float64(Float64(z * y) * -0.5)) tmp = 0.0 if (Float64(z * y) <= -5e+159) tmp = t_1; elseif (Float64(z * y) <= 5e+89) tmp = Float64(t - Float64(x * -0.125)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t + ((z * y) * -0.5); tmp = 0.0; if ((z * y) <= -5e+159) tmp = t_1; elseif ((z * y) <= 5e+89) tmp = t - (x * -0.125); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t + N[(N[(z * y), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * y), $MachinePrecision], -5e+159], t$95$1, If[LessEqual[N[(z * y), $MachinePrecision], 5e+89], N[(t - N[(x * -0.125), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(z \cdot y\right) \cdot -0.5\\
\mathbf{if}\;z \cdot y \leq -5 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot y \leq 5 \cdot 10^{+89}:\\
\;\;\;\;t - x \cdot -0.125\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 y z) < -5.00000000000000003e159 or 4.99999999999999983e89 < (*.f64 y z) Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.0%
Simplified93.0%
if -5.00000000000000003e159 < (*.f64 y z) < 4.99999999999999983e89Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0
remove-double-negN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
mul-1-negN/A
distribute-lft-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval88.5%
Simplified88.5%
Final simplification89.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (* z y) -0.5)))
(if (<= (* z y) -2.6e+151)
t_1
(if (<= (* z y) 2.35e+91) (- t (* x -0.125)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (z * y) * -0.5;
double tmp;
if ((z * y) <= -2.6e+151) {
tmp = t_1;
} else if ((z * y) <= 2.35e+91) {
tmp = t - (x * -0.125);
} 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 = (z * y) * (-0.5d0)
if ((z * y) <= (-2.6d+151)) then
tmp = t_1
else if ((z * y) <= 2.35d+91) then
tmp = t - (x * (-0.125d0))
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 = (z * y) * -0.5;
double tmp;
if ((z * y) <= -2.6e+151) {
tmp = t_1;
} else if ((z * y) <= 2.35e+91) {
tmp = t - (x * -0.125);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * y) * -0.5 tmp = 0 if (z * y) <= -2.6e+151: tmp = t_1 elif (z * y) <= 2.35e+91: tmp = t - (x * -0.125) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * y) * -0.5) tmp = 0.0 if (Float64(z * y) <= -2.6e+151) tmp = t_1; elseif (Float64(z * y) <= 2.35e+91) tmp = Float64(t - Float64(x * -0.125)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * y) * -0.5; tmp = 0.0; if ((z * y) <= -2.6e+151) tmp = t_1; elseif ((z * y) <= 2.35e+91) tmp = t - (x * -0.125); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * -0.5), $MachinePrecision]}, If[LessEqual[N[(z * y), $MachinePrecision], -2.6e+151], t$95$1, If[LessEqual[N[(z * y), $MachinePrecision], 2.35e+91], N[(t - N[(x * -0.125), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot -0.5\\
\mathbf{if}\;z \cdot y \leq -2.6 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot y \leq 2.35 \cdot 10^{+91}:\\
\;\;\;\;t - x \cdot -0.125\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 y z) < -2.60000000000000013e151 or 2.3499999999999999e91 < (*.f64 y z) Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-lowering-*.f6483.8%
Simplified83.8%
if -2.60000000000000013e151 < (*.f64 y z) < 2.3499999999999999e91Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0
remove-double-negN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
mul-1-negN/A
distribute-lft-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval88.5%
Simplified88.5%
Final simplification87.0%
(FPCore (x y z t) :precision binary64 (if (<= t -1.85e-59) t (if (<= t 2.1e+46) (* 0.125 x) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.85e-59) {
tmp = t;
} else if (t <= 2.1e+46) {
tmp = 0.125 * x;
} else {
tmp = 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 (t <= (-1.85d-59)) then
tmp = t
else if (t <= 2.1d+46) then
tmp = 0.125d0 * x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.85e-59) {
tmp = t;
} else if (t <= 2.1e+46) {
tmp = 0.125 * x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.85e-59: tmp = t elif t <= 2.1e+46: tmp = 0.125 * x else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.85e-59) tmp = t; elseif (t <= 2.1e+46) tmp = Float64(0.125 * x); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.85e-59) tmp = t; elseif (t <= 2.1e+46) tmp = 0.125 * x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.85e-59], t, If[LessEqual[t, 2.1e+46], N[(0.125 * x), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-59}:\\
\;\;\;\;t\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+46}:\\
\;\;\;\;0.125 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if t < -1.85e-59 or 2.1e46 < t Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around inf
Simplified59.9%
if -1.85e-59 < t < 2.1e46Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf
*-lowering-*.f6452.1%
Simplified52.1%
(FPCore (x y z t) :precision binary64 (+ (* 0.125 x) (+ t (/ (* z y) -2.0))))
double code(double x, double y, double z, double t) {
return (0.125 * x) + (t + ((z * y) / -2.0));
}
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 = (0.125d0 * x) + (t + ((z * y) / (-2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (0.125 * x) + (t + ((z * y) / -2.0));
}
def code(x, y, z, t): return (0.125 * x) + (t + ((z * y) / -2.0))
function code(x, y, z, t) return Float64(Float64(0.125 * x) + Float64(t + Float64(Float64(z * y) / -2.0))) end
function tmp = code(x, y, z, t) tmp = (0.125 * x) + (t + ((z * y) / -2.0)); end
code[x_, y_, z_, t_] := N[(N[(0.125 * x), $MachinePrecision] + N[(t + N[(N[(z * y), $MachinePrecision] / -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.125 \cdot x + \left(t + \frac{z \cdot y}{-2}\right)
\end{array}
Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
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 = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 100.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around inf
Simplified34.0%
(FPCore (x y z t) :precision binary64 (- (+ (/ x 8.0) t) (* (/ z 2.0) y)))
double code(double x, double y, double z, double t) {
return ((x / 8.0) + t) - ((z / 2.0) * y);
}
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 / 8.0d0) + t) - ((z / 2.0d0) * y)
end function
public static double code(double x, double y, double z, double t) {
return ((x / 8.0) + t) - ((z / 2.0) * y);
}
def code(x, y, z, t): return ((x / 8.0) + t) - ((z / 2.0) * y)
function code(x, y, z, t) return Float64(Float64(Float64(x / 8.0) + t) - Float64(Float64(z / 2.0) * y)) end
function tmp = code(x, y, z, t) tmp = ((x / 8.0) + t) - ((z / 2.0) * y); end
code[x_, y_, z_, t_] := N[(N[(N[(x / 8.0), $MachinePrecision] + t), $MachinePrecision] - N[(N[(z / 2.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{x}{8} + t\right) - \frac{z}{2} \cdot y
\end{array}
herbie shell --seed 2024152
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, B"
:precision binary64
:alt
(! :herbie-platform default (- (+ (/ x 8) t) (* (/ z 2) y)))
(+ (- (* (/ 1.0 8.0) x) (/ (* y z) 2.0)) t))