
(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 8 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)) (t_2 (* 0.5 (/ x t))))
(if (<= y -1.06e-262)
t_2
(if (<= y 4.2e-111)
t_1
(if (<= y 3.15e-65) t_2 (if (<= y 3.25e-24) t_1 (/ (* y 0.5) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * -0.5) / t;
double t_2 = 0.5 * (x / t);
double tmp;
if (y <= -1.06e-262) {
tmp = t_2;
} else if (y <= 4.2e-111) {
tmp = t_1;
} else if (y <= 3.15e-65) {
tmp = t_2;
} else if (y <= 3.25e-24) {
tmp = t_1;
} else {
tmp = (y * 0.5) / 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) :: t_2
real(8) :: tmp
t_1 = (z * (-0.5d0)) / t
t_2 = 0.5d0 * (x / t)
if (y <= (-1.06d-262)) then
tmp = t_2
else if (y <= 4.2d-111) then
tmp = t_1
else if (y <= 3.15d-65) then
tmp = t_2
else if (y <= 3.25d-24) then
tmp = t_1
else
tmp = (y * 0.5d0) / t
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 t_2 = 0.5 * (x / t);
double tmp;
if (y <= -1.06e-262) {
tmp = t_2;
} else if (y <= 4.2e-111) {
tmp = t_1;
} else if (y <= 3.15e-65) {
tmp = t_2;
} else if (y <= 3.25e-24) {
tmp = t_1;
} else {
tmp = (y * 0.5) / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * -0.5) / t t_2 = 0.5 * (x / t) tmp = 0 if y <= -1.06e-262: tmp = t_2 elif y <= 4.2e-111: tmp = t_1 elif y <= 3.15e-65: tmp = t_2 elif y <= 3.25e-24: tmp = t_1 else: tmp = (y * 0.5) / t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * -0.5) / t) t_2 = Float64(0.5 * Float64(x / t)) tmp = 0.0 if (y <= -1.06e-262) tmp = t_2; elseif (y <= 4.2e-111) tmp = t_1; elseif (y <= 3.15e-65) tmp = t_2; elseif (y <= 3.25e-24) tmp = t_1; else tmp = Float64(Float64(y * 0.5) / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * -0.5) / t; t_2 = 0.5 * (x / t); tmp = 0.0; if (y <= -1.06e-262) tmp = t_2; elseif (y <= 4.2e-111) tmp = t_1; elseif (y <= 3.15e-65) tmp = t_2; elseif (y <= 3.25e-24) tmp = t_1; else tmp = (y * 0.5) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.06e-262], t$95$2, If[LessEqual[y, 4.2e-111], t$95$1, If[LessEqual[y, 3.15e-65], t$95$2, If[LessEqual[y, 3.25e-24], t$95$1, N[(N[(y * 0.5), $MachinePrecision] / t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot -0.5}{t}\\
t_2 := 0.5 \cdot \frac{x}{t}\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{-262}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.15 \cdot 10^{-65}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3.25 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot 0.5}{t}\\
\end{array}
\end{array}
if y < -1.0599999999999999e-262 or 4.1999999999999997e-111 < y < 3.1499999999999998e-65Initial program 100.0%
Taylor expanded in x around inf 45.5%
if -1.0599999999999999e-262 < y < 4.1999999999999997e-111 or 3.1499999999999998e-65 < y < 3.25e-24Initial program 100.0%
Taylor expanded in z around inf 60.4%
*-commutative60.4%
associate-*l/60.4%
Simplified60.4%
if 3.25e-24 < y Initial program 100.0%
Taylor expanded in y around inf 56.7%
associate-*r/56.7%
Simplified56.7%
Final simplification52.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ -0.5 t))) (t_2 (* 0.5 (/ x t))))
(if (<= y -4.9e-259)
t_2
(if (<= y 1.55e-86)
t_1
(if (<= y 2.45e-65) t_2 (if (<= y 1.4e-22) t_1 (/ (* y 0.5) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (-0.5 / t);
double t_2 = 0.5 * (x / t);
double tmp;
if (y <= -4.9e-259) {
tmp = t_2;
} else if (y <= 1.55e-86) {
tmp = t_1;
} else if (y <= 2.45e-65) {
tmp = t_2;
} else if (y <= 1.4e-22) {
tmp = t_1;
} else {
tmp = (y * 0.5) / 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) :: t_2
real(8) :: tmp
t_1 = z * ((-0.5d0) / t)
t_2 = 0.5d0 * (x / t)
if (y <= (-4.9d-259)) then
tmp = t_2
else if (y <= 1.55d-86) then
tmp = t_1
else if (y <= 2.45d-65) then
tmp = t_2
else if (y <= 1.4d-22) then
tmp = t_1
else
tmp = (y * 0.5d0) / t
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 t_2 = 0.5 * (x / t);
double tmp;
if (y <= -4.9e-259) {
tmp = t_2;
} else if (y <= 1.55e-86) {
tmp = t_1;
} else if (y <= 2.45e-65) {
tmp = t_2;
} else if (y <= 1.4e-22) {
tmp = t_1;
} else {
tmp = (y * 0.5) / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (-0.5 / t) t_2 = 0.5 * (x / t) tmp = 0 if y <= -4.9e-259: tmp = t_2 elif y <= 1.55e-86: tmp = t_1 elif y <= 2.45e-65: tmp = t_2 elif y <= 1.4e-22: tmp = t_1 else: tmp = (y * 0.5) / t return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-0.5 / t)) t_2 = Float64(0.5 * Float64(x / t)) tmp = 0.0 if (y <= -4.9e-259) tmp = t_2; elseif (y <= 1.55e-86) tmp = t_1; elseif (y <= 2.45e-65) tmp = t_2; elseif (y <= 1.4e-22) tmp = t_1; else tmp = Float64(Float64(y * 0.5) / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (-0.5 / t); t_2 = 0.5 * (x / t); tmp = 0.0; if (y <= -4.9e-259) tmp = t_2; elseif (y <= 1.55e-86) tmp = t_1; elseif (y <= 2.45e-65) tmp = t_2; elseif (y <= 1.4e-22) tmp = t_1; else tmp = (y * 0.5) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.9e-259], t$95$2, If[LessEqual[y, 1.55e-86], t$95$1, If[LessEqual[y, 2.45e-65], t$95$2, If[LessEqual[y, 1.4e-22], t$95$1, N[(N[(y * 0.5), $MachinePrecision] / t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{-0.5}{t}\\
t_2 := 0.5 \cdot \frac{x}{t}\\
\mathbf{if}\;y \leq -4.9 \cdot 10^{-259}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{-65}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot 0.5}{t}\\
\end{array}
\end{array}
if y < -4.90000000000000023e-259 or 1.54999999999999994e-86 < y < 2.44999999999999982e-65Initial program 100.0%
Taylor expanded in x around inf 45.5%
if -4.90000000000000023e-259 < y < 1.54999999999999994e-86 or 2.44999999999999982e-65 < y < 1.39999999999999997e-22Initial program 100.0%
Taylor expanded in z around inf 59.3%
*-commutative59.3%
associate-*l/59.3%
associate-*r/59.2%
Simplified59.2%
if 1.39999999999999997e-22 < y Initial program 100.0%
Taylor expanded in y around inf 57.4%
associate-*r/57.4%
Simplified57.4%
Final simplification52.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.12e+61) (not (<= z 5.2e+119))) (/ (* z -0.5) t) (* 0.5 (/ (+ x y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.12e+61) || !(z <= 5.2e+119)) {
tmp = (z * -0.5) / t;
} else {
tmp = 0.5 * ((x + 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 ((z <= (-1.12d+61)) .or. (.not. (z <= 5.2d+119))) then
tmp = (z * (-0.5d0)) / t
else
tmp = 0.5d0 * ((x + y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.12e+61) || !(z <= 5.2e+119)) {
tmp = (z * -0.5) / t;
} else {
tmp = 0.5 * ((x + y) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.12e+61) or not (z <= 5.2e+119): tmp = (z * -0.5) / t else: tmp = 0.5 * ((x + y) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.12e+61) || !(z <= 5.2e+119)) tmp = Float64(Float64(z * -0.5) / t); else tmp = Float64(0.5 * Float64(Float64(x + y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.12e+61) || ~((z <= 5.2e+119))) tmp = (z * -0.5) / t; else tmp = 0.5 * ((x + y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.12e+61], N[Not[LessEqual[z, 5.2e+119]], $MachinePrecision]], N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision], N[(0.5 * N[(N[(x + y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+61} \lor \neg \left(z \leq 5.2 \cdot 10^{+119}\right):\\
\;\;\;\;\frac{z \cdot -0.5}{t}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x + y}{t}\\
\end{array}
\end{array}
if z < -1.12e61 or 5.2e119 < z Initial program 100.0%
Taylor expanded in z around inf 79.3%
*-commutative79.3%
associate-*l/79.3%
Simplified79.3%
if -1.12e61 < z < 5.2e119Initial program 100.0%
Taylor expanded in z around 0 88.9%
+-commutative88.9%
Simplified88.9%
Final simplification85.8%
(FPCore (x y z t) :precision binary64 (if (<= x -8e+47) (* (- x z) (/ 0.5 t)) (/ (* 0.5 (- y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8e+47) {
tmp = (x - z) * (0.5 / t);
} else {
tmp = (0.5 * (y - z)) / 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 <= (-8d+47)) then
tmp = (x - z) * (0.5d0 / t)
else
tmp = (0.5d0 * (y - z)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8e+47) {
tmp = (x - z) * (0.5 / t);
} else {
tmp = (0.5 * (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -8e+47: tmp = (x - z) * (0.5 / t) else: tmp = (0.5 * (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -8e+47) tmp = Float64(Float64(x - z) * Float64(0.5 / t)); else tmp = Float64(Float64(0.5 * Float64(y - z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -8e+47) tmp = (x - z) * (0.5 / t); else tmp = (0.5 * (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -8e+47], N[(N[(x - z), $MachinePrecision] * N[(0.5 / t), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+47}:\\
\;\;\;\;\left(x - z\right) \cdot \frac{0.5}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot \left(y - z\right)}{t}\\
\end{array}
\end{array}
if x < -8.0000000000000004e47Initial program 100.0%
Taylor expanded in y around 0 84.8%
*-commutative84.8%
associate-*l/84.8%
associate-/l*84.6%
Simplified84.6%
if -8.0000000000000004e47 < x Initial program 100.0%
Taylor expanded in x around 0 74.5%
associate-*r/74.5%
Simplified74.5%
(FPCore (x y z t) :precision binary64 (if (<= y 1.35e-22) (* (- x z) (/ 0.5 t)) (* 0.5 (/ (+ x y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.35e-22) {
tmp = (x - z) * (0.5 / t);
} else {
tmp = 0.5 * ((x + 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 (y <= 1.35d-22) then
tmp = (x - z) * (0.5d0 / t)
else
tmp = 0.5d0 * ((x + y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.35e-22) {
tmp = (x - z) * (0.5 / t);
} else {
tmp = 0.5 * ((x + y) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 1.35e-22: tmp = (x - z) * (0.5 / t) else: tmp = 0.5 * ((x + y) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 1.35e-22) tmp = Float64(Float64(x - z) * Float64(0.5 / t)); else tmp = Float64(0.5 * Float64(Float64(x + y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 1.35e-22) tmp = (x - z) * (0.5 / t); else tmp = 0.5 * ((x + y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.35e-22], N[(N[(x - z), $MachinePrecision] * N[(0.5 / t), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[(x + y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.35 \cdot 10^{-22}:\\
\;\;\;\;\left(x - z\right) \cdot \frac{0.5}{t}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x + y}{t}\\
\end{array}
\end{array}
if y < 1.3500000000000001e-22Initial program 100.0%
Taylor expanded in y around 0 80.0%
*-commutative80.0%
associate-*l/80.0%
associate-/l*79.8%
Simplified79.8%
if 1.3500000000000001e-22 < y Initial program 100.0%
Taylor expanded in z around 0 83.9%
+-commutative83.9%
Simplified83.9%
Final simplification80.9%
(FPCore (x y z t) :precision binary64 (if (<= x -3.5e+35) (* 0.5 (/ x t)) (* z (/ -0.5 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.5e+35) {
tmp = 0.5 * (x / t);
} else {
tmp = z * (-0.5 / 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 <= (-3.5d+35)) then
tmp = 0.5d0 * (x / t)
else
tmp = z * ((-0.5d0) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.5e+35) {
tmp = 0.5 * (x / t);
} else {
tmp = z * (-0.5 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.5e+35: tmp = 0.5 * (x / t) else: tmp = z * (-0.5 / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.5e+35) tmp = Float64(0.5 * Float64(x / t)); else tmp = Float64(z * Float64(-0.5 / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.5e+35) tmp = 0.5 * (x / t); else tmp = z * (-0.5 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.5e+35], N[(0.5 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{+35}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{-0.5}{t}\\
\end{array}
\end{array}
if x < -3.5000000000000001e35Initial program 100.0%
Taylor expanded in x around inf 73.5%
if -3.5000000000000001e35 < x Initial program 100.0%
Taylor expanded in z around inf 41.9%
*-commutative41.9%
associate-*l/41.9%
associate-*r/41.8%
Simplified41.8%
(FPCore (x y z t) :precision binary64 (* 0.5 (/ x t)))
double code(double x, double y, double z, double t) {
return 0.5 * (x / 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 = 0.5d0 * (x / t)
end function
public static double code(double x, double y, double z, double t) {
return 0.5 * (x / t);
}
def code(x, y, z, t): return 0.5 * (x / t)
function code(x, y, z, t) return Float64(0.5 * Float64(x / t)) end
function tmp = code(x, y, z, t) tmp = 0.5 * (x / t); end
code[x_, y_, z_, t_] := N[(0.5 * N[(x / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.5 \cdot \frac{x}{t}
\end{array}
Initial program 100.0%
Taylor expanded in x around inf 41.4%
herbie shell --seed 2024086
(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)))