
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0)))
double code(double x, double y, double z, double t) {
return ((x + y) - z) / (t * 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 = ((x + y) - z) / (t * 2.0d0)
end function
public static double code(double x, double y, double z, double t) {
return ((x + y) - z) / (t * 2.0);
}
def code(x, y, z, t): return ((x + y) - z) / (t * 2.0)
function code(x, y, z, t) return Float64(Float64(Float64(x + y) - z) / Float64(t * 2.0)) end
function tmp = code(x, y, z, t) tmp = ((x + y) - z) / (t * 2.0); end
code[x_, y_, z_, t_] := N[(N[(N[(x + y), $MachinePrecision] - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x + y\right) - z}{t \cdot 2}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0)))
double code(double x, double y, double z, double t) {
return ((x + y) - z) / (t * 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 = ((x + y) - z) / (t * 2.0d0)
end function
public static double code(double x, double y, double z, double t) {
return ((x + y) - z) / (t * 2.0);
}
def code(x, y, z, t): return ((x + y) - z) / (t * 2.0)
function code(x, y, z, t) return Float64(Float64(Float64(x + y) - z) / Float64(t * 2.0)) end
function tmp = code(x, y, z, t) tmp = ((x + y) - z) / (t * 2.0); end
code[x_, y_, z_, t_] := N[(N[(N[(x + y), $MachinePrecision] - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x + y\right) - z}{t \cdot 2}
\end{array}
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0)))
double code(double x, double y, double z, double t) {
return ((x + y) - z) / (t * 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 = ((x + y) - z) / (t * 2.0d0)
end function
public static double code(double x, double y, double z, double t) {
return ((x + y) - z) / (t * 2.0);
}
def code(x, y, z, t): return ((x + y) - z) / (t * 2.0)
function code(x, y, z, t) return Float64(Float64(Float64(x + y) - z) / Float64(t * 2.0)) end
function tmp = code(x, y, z, t) tmp = ((x + y) - z) / (t * 2.0); end
code[x_, y_, z_, t_] := N[(N[(N[(x + y), $MachinePrecision] - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x + y\right) - z}{t \cdot 2}
\end{array}
Initial program 100.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (* z -0.5) t))) (if (<= z -8.4e+157) t_1 (if (<= z 4.7e+119) (/ (+ y x) (* t 2.0)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (z * -0.5) / t;
double tmp;
if (z <= -8.4e+157) {
tmp = t_1;
} else if (z <= 4.7e+119) {
tmp = (y + x) / (t * 2.0);
} 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 * (-0.5d0)) / t
if (z <= (-8.4d+157)) then
tmp = t_1
else if (z <= 4.7d+119) then
tmp = (y + x) / (t * 2.0d0)
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 * -0.5) / t;
double tmp;
if (z <= -8.4e+157) {
tmp = t_1;
} else if (z <= 4.7e+119) {
tmp = (y + x) / (t * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * -0.5) / t tmp = 0 if z <= -8.4e+157: tmp = t_1 elif z <= 4.7e+119: tmp = (y + x) / (t * 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * -0.5) / t) tmp = 0.0 if (z <= -8.4e+157) tmp = t_1; elseif (z <= 4.7e+119) tmp = Float64(Float64(y + x) / Float64(t * 2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * -0.5) / t; tmp = 0.0; if (z <= -8.4e+157) tmp = t_1; elseif (z <= 4.7e+119) tmp = (y + x) / (t * 2.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -8.4e+157], t$95$1, If[LessEqual[z, 4.7e+119], N[(N[(y + x), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot -0.5}{t}\\
\mathbf{if}\;z \leq -8.4 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+119}:\\
\;\;\;\;\frac{y + x}{t \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.4e157 or 4.70000000000000008e119 < z Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if -8.4e157 < z < 4.70000000000000008e119Initial program 100.0%
Taylor expanded in z around 0 0
Simplified0
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (* z -0.5) t))) (if (<= z -1.4e+158) t_1 (if (<= z 1.7e+119) (* (/ 0.5 t) (+ y x)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (z * -0.5) / t;
double tmp;
if (z <= -1.4e+158) {
tmp = t_1;
} else if (z <= 1.7e+119) {
tmp = (0.5 / t) * (y + 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 = (z * (-0.5d0)) / t
if (z <= (-1.4d+158)) then
tmp = t_1
else if (z <= 1.7d+119) then
tmp = (0.5d0 / t) * (y + 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 = (z * -0.5) / t;
double tmp;
if (z <= -1.4e+158) {
tmp = t_1;
} else if (z <= 1.7e+119) {
tmp = (0.5 / t) * (y + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * -0.5) / t tmp = 0 if z <= -1.4e+158: tmp = t_1 elif z <= 1.7e+119: tmp = (0.5 / t) * (y + x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * -0.5) / t) tmp = 0.0 if (z <= -1.4e+158) tmp = t_1; elseif (z <= 1.7e+119) tmp = Float64(Float64(0.5 / t) * Float64(y + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * -0.5) / t; tmp = 0.0; if (z <= -1.4e+158) tmp = t_1; elseif (z <= 1.7e+119) tmp = (0.5 / t) * (y + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -1.4e+158], t$95$1, If[LessEqual[z, 1.7e+119], N[(N[(0.5 / t), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot -0.5}{t}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+119}:\\
\;\;\;\;\frac{0.5}{t} \cdot \left(y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.40000000000000001e158 or 1.70000000000000007e119 < z Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if -1.40000000000000001e158 < z < 1.70000000000000007e119Initial program 100.0%
Taylor expanded in z around 0 0
Simplified0
(FPCore (x y z t) :precision binary64 (if (<= x -2.8e+90) (/ x (* t 2.0)) (if (<= x -8.5e-62) (/ (* z -0.5) t) (/ (* 0.5 y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.8e+90) {
tmp = x / (t * 2.0);
} else if (x <= -8.5e-62) {
tmp = (z * -0.5) / t;
} else {
tmp = (0.5 * y) / 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 (x <= (-2.8d+90)) then
tmp = x / (t * 2.0d0)
else if (x <= (-8.5d-62)) then
tmp = (z * (-0.5d0)) / t
else
tmp = (0.5d0 * y) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.8e+90) {
tmp = x / (t * 2.0);
} else if (x <= -8.5e-62) {
tmp = (z * -0.5) / t;
} else {
tmp = (0.5 * y) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.8e+90: tmp = x / (t * 2.0) elif x <= -8.5e-62: tmp = (z * -0.5) / t else: tmp = (0.5 * y) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.8e+90) tmp = Float64(x / Float64(t * 2.0)); elseif (x <= -8.5e-62) tmp = Float64(Float64(z * -0.5) / t); else tmp = Float64(Float64(0.5 * y) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.8e+90) tmp = x / (t * 2.0); elseif (x <= -8.5e-62) tmp = (z * -0.5) / t; else tmp = (0.5 * y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.8e+90], N[(x / N[(t * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8.5e-62], N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision], N[(N[(0.5 * y), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+90}:\\
\;\;\;\;\frac{x}{t \cdot 2}\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-62}:\\
\;\;\;\;\frac{z \cdot -0.5}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot y}{t}\\
\end{array}
\end{array}
if x < -2.8e90Initial program 100.0%
Taylor expanded in x around inf 0
Simplified0
if -2.8e90 < x < -8.4999999999999995e-62Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if -8.4999999999999995e-62 < x Initial program 100.0%
Taylor expanded in y around inf 0
Simplified0
(FPCore (x y z t) :precision binary64 (if (<= x -0.084) (/ (- x z) (* t 2.0)) (/ (- y z) (* t 2.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.084) {
tmp = (x - z) / (t * 2.0);
} else {
tmp = (y - z) / (t * 2.0);
}
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 (x <= (-0.084d0)) then
tmp = (x - z) / (t * 2.0d0)
else
tmp = (y - z) / (t * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.084) {
tmp = (x - z) / (t * 2.0);
} else {
tmp = (y - z) / (t * 2.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.084: tmp = (x - z) / (t * 2.0) else: tmp = (y - z) / (t * 2.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.084) tmp = Float64(Float64(x - z) / Float64(t * 2.0)); else tmp = Float64(Float64(y - z) / Float64(t * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.084) tmp = (x - z) / (t * 2.0); else tmp = (y - z) / (t * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.084], N[(N[(x - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.084:\\
\;\;\;\;\frac{x - z}{t \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{y - z}{t \cdot 2}\\
\end{array}
\end{array}
if x < -0.0840000000000000052Initial program 100.0%
Taylor expanded in x around inf 0
Simplified0
if -0.0840000000000000052 < x Initial program 100.0%
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y z t) :precision binary64 (if (<= y 7e-33) (/ (- x z) (* t 2.0)) (/ (+ y x) (* t 2.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 7e-33) {
tmp = (x - z) / (t * 2.0);
} else {
tmp = (y + x) / (t * 2.0);
}
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 (y <= 7d-33) then
tmp = (x - z) / (t * 2.0d0)
else
tmp = (y + x) / (t * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 7e-33) {
tmp = (x - z) / (t * 2.0);
} else {
tmp = (y + x) / (t * 2.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 7e-33: tmp = (x - z) / (t * 2.0) else: tmp = (y + x) / (t * 2.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 7e-33) tmp = Float64(Float64(x - z) / Float64(t * 2.0)); else tmp = Float64(Float64(y + x) / Float64(t * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 7e-33) tmp = (x - z) / (t * 2.0); else tmp = (y + x) / (t * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 7e-33], N[(N[(x - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7 \cdot 10^{-33}:\\
\;\;\;\;\frac{x - z}{t \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{y + x}{t \cdot 2}\\
\end{array}
\end{array}
if y < 6.9999999999999997e-33Initial program 100.0%
Taylor expanded in x around inf 0
Simplified0
if 6.9999999999999997e-33 < y Initial program 100.0%
Taylor expanded in z around 0 0
Simplified0
(FPCore (x y z t) :precision binary64 (if (<= x -0.082) (/ x (* t 2.0)) (/ (* 0.5 y) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.082) {
tmp = x / (t * 2.0);
} else {
tmp = (0.5 * y) / 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 (x <= (-0.082d0)) then
tmp = x / (t * 2.0d0)
else
tmp = (0.5d0 * y) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.082) {
tmp = x / (t * 2.0);
} else {
tmp = (0.5 * y) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.082: tmp = x / (t * 2.0) else: tmp = (0.5 * y) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.082) tmp = Float64(x / Float64(t * 2.0)); else tmp = Float64(Float64(0.5 * y) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.082) tmp = x / (t * 2.0); else tmp = (0.5 * y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.082], N[(x / N[(t * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.082:\\
\;\;\;\;\frac{x}{t \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot y}{t}\\
\end{array}
\end{array}
if x < -0.0820000000000000034Initial program 100.0%
Taylor expanded in x around inf 0
Simplified0
if -0.0820000000000000034 < x Initial program 100.0%
Taylor expanded in y around inf 0
Simplified0
(FPCore (x y z t) :precision binary64 (if (<= x -0.051) (/ x (* t 2.0)) (* (/ 0.5 t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.051) {
tmp = x / (t * 2.0);
} else {
tmp = (0.5 / t) * y;
}
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 (x <= (-0.051d0)) then
tmp = x / (t * 2.0d0)
else
tmp = (0.5d0 / t) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.051) {
tmp = x / (t * 2.0);
} else {
tmp = (0.5 / t) * y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.051: tmp = x / (t * 2.0) else: tmp = (0.5 / t) * y return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.051) tmp = Float64(x / Float64(t * 2.0)); else tmp = Float64(Float64(0.5 / t) * y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.051) tmp = x / (t * 2.0); else tmp = (0.5 / t) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.051], N[(x / N[(t * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / t), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.051:\\
\;\;\;\;\frac{x}{t \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{t} \cdot y\\
\end{array}
\end{array}
if x < -0.0509999999999999967Initial program 100.0%
Taylor expanded in x around inf 0
Simplified0
if -0.0509999999999999967 < x Initial program 100.0%
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
(FPCore (x y z t) :precision binary64 (if (<= x -0.074) (/ 0.5 (/ t x)) (* (/ 0.5 t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.074) {
tmp = 0.5 / (t / x);
} else {
tmp = (0.5 / t) * y;
}
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 (x <= (-0.074d0)) then
tmp = 0.5d0 / (t / x)
else
tmp = (0.5d0 / t) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.074) {
tmp = 0.5 / (t / x);
} else {
tmp = (0.5 / t) * y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.074: tmp = 0.5 / (t / x) else: tmp = (0.5 / t) * y return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.074) tmp = Float64(0.5 / Float64(t / x)); else tmp = Float64(Float64(0.5 / t) * y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.074) tmp = 0.5 / (t / x); else tmp = (0.5 / t) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.074], N[(0.5 / N[(t / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / t), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.074:\\
\;\;\;\;\frac{0.5}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{t} \cdot y\\
\end{array}
\end{array}
if x < -0.0739999999999999963Initial program 100.0%
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
if -0.0739999999999999963 < x Initial program 100.0%
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
(FPCore (x y z t) :precision binary64 (* (/ 0.5 t) y))
double code(double x, double y, double z, double t) {
return (0.5 / t) * 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 = (0.5d0 / t) * y
end function
public static double code(double x, double y, double z, double t) {
return (0.5 / t) * y;
}
def code(x, y, z, t): return (0.5 / t) * y
function code(x, y, z, t) return Float64(Float64(0.5 / t) * y) end
function tmp = code(x, y, z, t) tmp = (0.5 / t) * y; end
code[x_, y_, z_, t_] := N[(N[(0.5 / t), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5}{t} \cdot y
\end{array}
Initial program 100.0%
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
herbie shell --seed 2024110
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
:precision binary64
(/ (- (+ x y) z) (* t 2.0)))