
(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 8 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 (- t (+ (/ (* y z) 2.0) (* x -0.125))))
double code(double x, double y, double z, double t) {
return t - (((y * z) / 2.0) + (x * -0.125));
}
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 - (((y * z) / 2.0d0) + (x * (-0.125d0)))
end function
public static double code(double x, double y, double z, double t) {
return t - (((y * z) / 2.0) + (x * -0.125));
}
def code(x, y, z, t): return t - (((y * z) / 2.0) + (x * -0.125))
function code(x, y, z, t) return Float64(t - Float64(Float64(Float64(y * z) / 2.0) + Float64(x * -0.125))) end
function tmp = code(x, y, z, t) tmp = t - (((y * z) / 2.0) + (x * -0.125)); end
code[x_, y_, z_, t_] := N[(t - N[(N[(N[(y * z), $MachinePrecision] / 2.0), $MachinePrecision] + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t - \left(\frac{y \cdot z}{2} + x \cdot -0.125\right)
\end{array}
Initial program 100.0%
Simplified0
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (* z -0.5))))
(if (<= t -1.15e+133)
t
(if (<= t -1.9e-7)
t_1
(if (<= t -1.6e-167)
(* x 0.125)
(if (<= t -5.8e-255)
t_1
(if (<= t 4.8e-274)
(* x 0.125)
(if (<= t 2.55e-243)
t_1
(if (<= t 2.3e-121)
(* x 0.125)
(if (<= t 1.4e+44) t_1 t))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (z * -0.5);
double tmp;
if (t <= -1.15e+133) {
tmp = t;
} else if (t <= -1.9e-7) {
tmp = t_1;
} else if (t <= -1.6e-167) {
tmp = x * 0.125;
} else if (t <= -5.8e-255) {
tmp = t_1;
} else if (t <= 4.8e-274) {
tmp = x * 0.125;
} else if (t <= 2.55e-243) {
tmp = t_1;
} else if (t <= 2.3e-121) {
tmp = x * 0.125;
} else if (t <= 1.4e+44) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y * (z * (-0.5d0))
if (t <= (-1.15d+133)) then
tmp = t
else if (t <= (-1.9d-7)) then
tmp = t_1
else if (t <= (-1.6d-167)) then
tmp = x * 0.125d0
else if (t <= (-5.8d-255)) then
tmp = t_1
else if (t <= 4.8d-274) then
tmp = x * 0.125d0
else if (t <= 2.55d-243) then
tmp = t_1
else if (t <= 2.3d-121) then
tmp = x * 0.125d0
else if (t <= 1.4d+44) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (z * -0.5);
double tmp;
if (t <= -1.15e+133) {
tmp = t;
} else if (t <= -1.9e-7) {
tmp = t_1;
} else if (t <= -1.6e-167) {
tmp = x * 0.125;
} else if (t <= -5.8e-255) {
tmp = t_1;
} else if (t <= 4.8e-274) {
tmp = x * 0.125;
} else if (t <= 2.55e-243) {
tmp = t_1;
} else if (t <= 2.3e-121) {
tmp = x * 0.125;
} else if (t <= 1.4e+44) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (z * -0.5) tmp = 0 if t <= -1.15e+133: tmp = t elif t <= -1.9e-7: tmp = t_1 elif t <= -1.6e-167: tmp = x * 0.125 elif t <= -5.8e-255: tmp = t_1 elif t <= 4.8e-274: tmp = x * 0.125 elif t <= 2.55e-243: tmp = t_1 elif t <= 2.3e-121: tmp = x * 0.125 elif t <= 1.4e+44: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(z * -0.5)) tmp = 0.0 if (t <= -1.15e+133) tmp = t; elseif (t <= -1.9e-7) tmp = t_1; elseif (t <= -1.6e-167) tmp = Float64(x * 0.125); elseif (t <= -5.8e-255) tmp = t_1; elseif (t <= 4.8e-274) tmp = Float64(x * 0.125); elseif (t <= 2.55e-243) tmp = t_1; elseif (t <= 2.3e-121) tmp = Float64(x * 0.125); elseif (t <= 1.4e+44) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (z * -0.5); tmp = 0.0; if (t <= -1.15e+133) tmp = t; elseif (t <= -1.9e-7) tmp = t_1; elseif (t <= -1.6e-167) tmp = x * 0.125; elseif (t <= -5.8e-255) tmp = t_1; elseif (t <= 4.8e-274) tmp = x * 0.125; elseif (t <= 2.55e-243) tmp = t_1; elseif (t <= 2.3e-121) tmp = x * 0.125; elseif (t <= 1.4e+44) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z * -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+133], t, If[LessEqual[t, -1.9e-7], t$95$1, If[LessEqual[t, -1.6e-167], N[(x * 0.125), $MachinePrecision], If[LessEqual[t, -5.8e-255], t$95$1, If[LessEqual[t, 4.8e-274], N[(x * 0.125), $MachinePrecision], If[LessEqual[t, 2.55e-243], t$95$1, If[LessEqual[t, 2.3e-121], N[(x * 0.125), $MachinePrecision], If[LessEqual[t, 1.4e+44], t$95$1, t]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z \cdot -0.5\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-167}:\\
\;\;\;\;x \cdot 0.125\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-274}:\\
\;\;\;\;x \cdot 0.125\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-121}:\\
\;\;\;\;x \cdot 0.125\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if t < -1.14999999999999995e133 or 1.4e44 < t Initial program 100.0%
Simplified0
Taylor expanded in t around inf 0
Simplified0
if -1.14999999999999995e133 < t < -1.90000000000000007e-7 or -1.6000000000000001e-167 < t < -5.80000000000000013e-255 or 4.8e-274 < t < 2.5499999999999998e-243 or 2.30000000000000012e-121 < t < 1.4e44Initial program 100.0%
Simplified0
Taylor expanded in y around inf 0
Simplified0
if -1.90000000000000007e-7 < t < -1.6000000000000001e-167 or -5.80000000000000013e-255 < t < 4.8e-274 or 2.5499999999999998e-243 < t < 2.30000000000000012e-121Initial program 100.0%
Simplified0
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y z t) :precision binary64 (if (<= t -1.05e+104) (- t (/ z (/ 2.0 y))) (if (<= t 8.2e+39) (+ (* y (* z -0.5)) (* x 0.125)) (- t (* y (* 0.5 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.05e+104) {
tmp = t - (z / (2.0 / y));
} else if (t <= 8.2e+39) {
tmp = (y * (z * -0.5)) + (x * 0.125);
} else {
tmp = t - (y * (0.5 * 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 <= (-1.05d+104)) then
tmp = t - (z / (2.0d0 / y))
else if (t <= 8.2d+39) then
tmp = (y * (z * (-0.5d0))) + (x * 0.125d0)
else
tmp = t - (y * (0.5d0 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.05e+104) {
tmp = t - (z / (2.0 / y));
} else if (t <= 8.2e+39) {
tmp = (y * (z * -0.5)) + (x * 0.125);
} else {
tmp = t - (y * (0.5 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.05e+104: tmp = t - (z / (2.0 / y)) elif t <= 8.2e+39: tmp = (y * (z * -0.5)) + (x * 0.125) else: tmp = t - (y * (0.5 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.05e+104) tmp = Float64(t - Float64(z / Float64(2.0 / y))); elseif (t <= 8.2e+39) tmp = Float64(Float64(y * Float64(z * -0.5)) + Float64(x * 0.125)); else tmp = Float64(t - Float64(y * Float64(0.5 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.05e+104) tmp = t - (z / (2.0 / y)); elseif (t <= 8.2e+39) tmp = (y * (z * -0.5)) + (x * 0.125); else tmp = t - (y * (0.5 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.05e+104], N[(t - N[(z / N[(2.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+39], N[(N[(y * N[(z * -0.5), $MachinePrecision]), $MachinePrecision] + N[(x * 0.125), $MachinePrecision]), $MachinePrecision], N[(t - N[(y * N[(0.5 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+104}:\\
\;\;\;\;t - \frac{z}{\frac{2}{y}}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+39}:\\
\;\;\;\;y \cdot \left(z \cdot -0.5\right) + x \cdot 0.125\\
\mathbf{else}:\\
\;\;\;\;t - y \cdot \left(0.5 \cdot z\right)\\
\end{array}
\end{array}
if t < -1.0499999999999999e104Initial program 100.0%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -1.0499999999999999e104 < t < 8.20000000000000008e39Initial program 100.0%
Simplified0
Taylor expanded in t around 0 0
Simplified0
if 8.20000000000000008e39 < t Initial program 100.0%
Simplified0
Taylor expanded in y around inf 0
Simplified0
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- t (* y (* 0.5 z))))) (if (<= y -3.8e+102) t_1 (if (<= y 5.2e-67) (- t (* -0.125 x)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = t - (y * (0.5 * z));
double tmp;
if (y <= -3.8e+102) {
tmp = t_1;
} else if (y <= 5.2e-67) {
tmp = t - (-0.125 * x);
} 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 - (y * (0.5d0 * z))
if (y <= (-3.8d+102)) then
tmp = t_1
else if (y <= 5.2d-67) then
tmp = t - ((-0.125d0) * x)
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 - (y * (0.5 * z));
double tmp;
if (y <= -3.8e+102) {
tmp = t_1;
} else if (y <= 5.2e-67) {
tmp = t - (-0.125 * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t - (y * (0.5 * z)) tmp = 0 if y <= -3.8e+102: tmp = t_1 elif y <= 5.2e-67: tmp = t - (-0.125 * x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t - Float64(y * Float64(0.5 * z))) tmp = 0.0 if (y <= -3.8e+102) tmp = t_1; elseif (y <= 5.2e-67) tmp = Float64(t - Float64(-0.125 * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t - (y * (0.5 * z)); tmp = 0.0; if (y <= -3.8e+102) tmp = t_1; elseif (y <= 5.2e-67) tmp = t - (-0.125 * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t - N[(y * N[(0.5 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+102], t$95$1, If[LessEqual[y, 5.2e-67], N[(t - N[(-0.125 * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - y \cdot \left(0.5 \cdot z\right)\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-67}:\\
\;\;\;\;t - -0.125 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.79999999999999979e102 or 5.1999999999999998e-67 < y Initial program 100.0%
Simplified0
Taylor expanded in y around inf 0
Simplified0
if -3.79999999999999979e102 < y < 5.1999999999999998e-67Initial program 100.0%
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* y (* z -0.5)))) (if (<= y -2.4e+123) t_1 (if (<= y 4.4e-61) (- t (* -0.125 x)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = y * (z * -0.5);
double tmp;
if (y <= -2.4e+123) {
tmp = t_1;
} else if (y <= 4.4e-61) {
tmp = t - (-0.125 * x);
} 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 = y * (z * (-0.5d0))
if (y <= (-2.4d+123)) then
tmp = t_1
else if (y <= 4.4d-61) then
tmp = t - ((-0.125d0) * x)
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 = y * (z * -0.5);
double tmp;
if (y <= -2.4e+123) {
tmp = t_1;
} else if (y <= 4.4e-61) {
tmp = t - (-0.125 * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (z * -0.5) tmp = 0 if y <= -2.4e+123: tmp = t_1 elif y <= 4.4e-61: tmp = t - (-0.125 * x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(z * -0.5)) tmp = 0.0 if (y <= -2.4e+123) tmp = t_1; elseif (y <= 4.4e-61) tmp = Float64(t - Float64(-0.125 * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (z * -0.5); tmp = 0.0; if (y <= -2.4e+123) tmp = t_1; elseif (y <= 4.4e-61) tmp = t - (-0.125 * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z * -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+123], t$95$1, If[LessEqual[y, 4.4e-61], N[(t - N[(-0.125 * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z \cdot -0.5\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-61}:\\
\;\;\;\;t - -0.125 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.39999999999999989e123 or 4.40000000000000017e-61 < y Initial program 100.0%
Simplified0
Taylor expanded in y around inf 0
Simplified0
if -2.39999999999999989e123 < y < 4.40000000000000017e-61Initial program 100.0%
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y z t) :precision binary64 (if (<= t -7e+103) t (if (<= t 4.2e+40) (* x 0.125) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7e+103) {
tmp = t;
} else if (t <= 4.2e+40) {
tmp = x * 0.125;
} 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 <= (-7d+103)) then
tmp = t
else if (t <= 4.2d+40) then
tmp = x * 0.125d0
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 <= -7e+103) {
tmp = t;
} else if (t <= 4.2e+40) {
tmp = x * 0.125;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -7e+103: tmp = t elif t <= 4.2e+40: tmp = x * 0.125 else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -7e+103) tmp = t; elseif (t <= 4.2e+40) tmp = Float64(x * 0.125); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -7e+103) tmp = t; elseif (t <= 4.2e+40) tmp = x * 0.125; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -7e+103], t, If[LessEqual[t, 4.2e+40], N[(x * 0.125), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+103}:\\
\;\;\;\;t\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+40}:\\
\;\;\;\;x \cdot 0.125\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if t < -7e103 or 4.2000000000000002e40 < t Initial program 100.0%
Simplified0
Taylor expanded in t around inf 0
Simplified0
if -7e103 < t < 4.2000000000000002e40Initial program 100.0%
Simplified0
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y z t) :precision binary64 (- t (+ (/ z (/ 2.0 y)) (* x -0.125))))
double code(double x, double y, double z, double t) {
return t - ((z / (2.0 / y)) + (x * -0.125));
}
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 - ((z / (2.0d0 / y)) + (x * (-0.125d0)))
end function
public static double code(double x, double y, double z, double t) {
return t - ((z / (2.0 / y)) + (x * -0.125));
}
def code(x, y, z, t): return t - ((z / (2.0 / y)) + (x * -0.125))
function code(x, y, z, t) return Float64(t - Float64(Float64(z / Float64(2.0 / y)) + Float64(x * -0.125))) end
function tmp = code(x, y, z, t) tmp = t - ((z / (2.0 / y)) + (x * -0.125)); end
code[x_, y_, z_, t_] := N[(t - N[(N[(z / N[(2.0 / y), $MachinePrecision]), $MachinePrecision] + N[(x * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t - \left(\frac{z}{\frac{2}{y}} + x \cdot -0.125\right)
\end{array}
Initial program 100.0%
Simplified0
Applied egg-rr0
Applied egg-rr0
(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%
Simplified0
Taylor expanded in t around inf 0
Simplified0
(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 2024110
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, B"
:precision binary64
:alt
(- (+ (/ x 8.0) t) (* (/ z 2.0) y))
(+ (- (* (/ 1.0 8.0) x) (/ (* y z) 2.0)) t))