
(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 11 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%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ 0.5 t))) (t_2 (/ -0.5 (/ t z))))
(if (<= y -6.2e-153)
t_1
(if (<= y -1.25e-205)
(* z (/ -0.5 t))
(if (<= y 1.05e-291)
t_1
(if (<= y 8.4e-14)
t_2
(if (<= y 4.8e+14)
t_1
(if (<= y 6.5e+79) t_2 (/ y (* t 2.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (0.5 / t);
double t_2 = -0.5 / (t / z);
double tmp;
if (y <= -6.2e-153) {
tmp = t_1;
} else if (y <= -1.25e-205) {
tmp = z * (-0.5 / t);
} else if (y <= 1.05e-291) {
tmp = t_1;
} else if (y <= 8.4e-14) {
tmp = t_2;
} else if (y <= 4.8e+14) {
tmp = t_1;
} else if (y <= 6.5e+79) {
tmp = t_2;
} else {
tmp = y / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (0.5d0 / t)
t_2 = (-0.5d0) / (t / z)
if (y <= (-6.2d-153)) then
tmp = t_1
else if (y <= (-1.25d-205)) then
tmp = z * ((-0.5d0) / t)
else if (y <= 1.05d-291) then
tmp = t_1
else if (y <= 8.4d-14) then
tmp = t_2
else if (y <= 4.8d+14) then
tmp = t_1
else if (y <= 6.5d+79) then
tmp = t_2
else
tmp = y / (t * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (0.5 / t);
double t_2 = -0.5 / (t / z);
double tmp;
if (y <= -6.2e-153) {
tmp = t_1;
} else if (y <= -1.25e-205) {
tmp = z * (-0.5 / t);
} else if (y <= 1.05e-291) {
tmp = t_1;
} else if (y <= 8.4e-14) {
tmp = t_2;
} else if (y <= 4.8e+14) {
tmp = t_1;
} else if (y <= 6.5e+79) {
tmp = t_2;
} else {
tmp = y / (t * 2.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (0.5 / t) t_2 = -0.5 / (t / z) tmp = 0 if y <= -6.2e-153: tmp = t_1 elif y <= -1.25e-205: tmp = z * (-0.5 / t) elif y <= 1.05e-291: tmp = t_1 elif y <= 8.4e-14: tmp = t_2 elif y <= 4.8e+14: tmp = t_1 elif y <= 6.5e+79: tmp = t_2 else: tmp = y / (t * 2.0) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(0.5 / t)) t_2 = Float64(-0.5 / Float64(t / z)) tmp = 0.0 if (y <= -6.2e-153) tmp = t_1; elseif (y <= -1.25e-205) tmp = Float64(z * Float64(-0.5 / t)); elseif (y <= 1.05e-291) tmp = t_1; elseif (y <= 8.4e-14) tmp = t_2; elseif (y <= 4.8e+14) tmp = t_1; elseif (y <= 6.5e+79) tmp = t_2; else tmp = Float64(y / Float64(t * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (0.5 / t); t_2 = -0.5 / (t / z); tmp = 0.0; if (y <= -6.2e-153) tmp = t_1; elseif (y <= -1.25e-205) tmp = z * (-0.5 / t); elseif (y <= 1.05e-291) tmp = t_1; elseif (y <= 8.4e-14) tmp = t_2; elseif (y <= 4.8e+14) tmp = t_1; elseif (y <= 6.5e+79) tmp = t_2; else tmp = y / (t * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(0.5 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-0.5 / N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e-153], t$95$1, If[LessEqual[y, -1.25e-205], N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-291], t$95$1, If[LessEqual[y, 8.4e-14], t$95$2, If[LessEqual[y, 4.8e+14], t$95$1, If[LessEqual[y, 6.5e+79], t$95$2, N[(y / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{0.5}{t}\\
t_2 := \frac{-0.5}{\frac{t}{z}}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{-153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-205}:\\
\;\;\;\;z \cdot \frac{-0.5}{t}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-291}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.4 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+79}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t \cdot 2}\\
\end{array}
\end{array}
if y < -6.1999999999999999e-153 or -1.25e-205 < y < 1.05e-291 or 8.3999999999999995e-14 < y < 4.8e14Initial program 100.0%
Taylor expanded in y around 0 97.5%
Taylor expanded in x around inf 38.4%
associate-*r/38.4%
associate-/l*38.3%
Simplified38.3%
associate-/r/38.3%
Applied egg-rr38.3%
if -6.1999999999999999e-153 < y < -1.25e-205Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 61.8%
if 1.05e-291 < y < 8.3999999999999995e-14 or 4.8e14 < y < 6.49999999999999954e79Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 50.7%
associate-*l/50.8%
associate-/l*50.6%
Applied egg-rr50.6%
if 6.49999999999999954e79 < y Initial program 100.0%
Taylor expanded in y around inf 65.1%
Final simplification47.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ 0.5 t))) (t_2 (/ z (/ t -0.5))))
(if (<= y -1.42e-154)
t_1
(if (<= y -1.1e-205)
(* z (/ -0.5 t))
(if (<= y 2e-286)
t_1
(if (<= y 2.15e-11)
t_2
(if (<= y 5e+14) t_1 (if (<= y 7.2e+79) t_2 (/ y (* t 2.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (0.5 / t);
double t_2 = z / (t / -0.5);
double tmp;
if (y <= -1.42e-154) {
tmp = t_1;
} else if (y <= -1.1e-205) {
tmp = z * (-0.5 / t);
} else if (y <= 2e-286) {
tmp = t_1;
} else if (y <= 2.15e-11) {
tmp = t_2;
} else if (y <= 5e+14) {
tmp = t_1;
} else if (y <= 7.2e+79) {
tmp = t_2;
} else {
tmp = y / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (0.5d0 / t)
t_2 = z / (t / (-0.5d0))
if (y <= (-1.42d-154)) then
tmp = t_1
else if (y <= (-1.1d-205)) then
tmp = z * ((-0.5d0) / t)
else if (y <= 2d-286) then
tmp = t_1
else if (y <= 2.15d-11) then
tmp = t_2
else if (y <= 5d+14) then
tmp = t_1
else if (y <= 7.2d+79) then
tmp = t_2
else
tmp = y / (t * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (0.5 / t);
double t_2 = z / (t / -0.5);
double tmp;
if (y <= -1.42e-154) {
tmp = t_1;
} else if (y <= -1.1e-205) {
tmp = z * (-0.5 / t);
} else if (y <= 2e-286) {
tmp = t_1;
} else if (y <= 2.15e-11) {
tmp = t_2;
} else if (y <= 5e+14) {
tmp = t_1;
} else if (y <= 7.2e+79) {
tmp = t_2;
} else {
tmp = y / (t * 2.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (0.5 / t) t_2 = z / (t / -0.5) tmp = 0 if y <= -1.42e-154: tmp = t_1 elif y <= -1.1e-205: tmp = z * (-0.5 / t) elif y <= 2e-286: tmp = t_1 elif y <= 2.15e-11: tmp = t_2 elif y <= 5e+14: tmp = t_1 elif y <= 7.2e+79: tmp = t_2 else: tmp = y / (t * 2.0) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(0.5 / t)) t_2 = Float64(z / Float64(t / -0.5)) tmp = 0.0 if (y <= -1.42e-154) tmp = t_1; elseif (y <= -1.1e-205) tmp = Float64(z * Float64(-0.5 / t)); elseif (y <= 2e-286) tmp = t_1; elseif (y <= 2.15e-11) tmp = t_2; elseif (y <= 5e+14) tmp = t_1; elseif (y <= 7.2e+79) tmp = t_2; else tmp = Float64(y / Float64(t * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (0.5 / t); t_2 = z / (t / -0.5); tmp = 0.0; if (y <= -1.42e-154) tmp = t_1; elseif (y <= -1.1e-205) tmp = z * (-0.5 / t); elseif (y <= 2e-286) tmp = t_1; elseif (y <= 2.15e-11) tmp = t_2; elseif (y <= 5e+14) tmp = t_1; elseif (y <= 7.2e+79) tmp = t_2; else tmp = y / (t * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(0.5 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[(t / -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.42e-154], t$95$1, If[LessEqual[y, -1.1e-205], N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-286], t$95$1, If[LessEqual[y, 2.15e-11], t$95$2, If[LessEqual[y, 5e+14], t$95$1, If[LessEqual[y, 7.2e+79], t$95$2, N[(y / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{0.5}{t}\\
t_2 := \frac{z}{\frac{t}{-0.5}}\\
\mathbf{if}\;y \leq -1.42 \cdot 10^{-154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-205}:\\
\;\;\;\;z \cdot \frac{-0.5}{t}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-286}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-11}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+79}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t \cdot 2}\\
\end{array}
\end{array}
if y < -1.42e-154 or -1.10000000000000005e-205 < y < 2.0000000000000001e-286 or 2.15000000000000001e-11 < y < 5e14Initial program 100.0%
Taylor expanded in y around 0 97.5%
Taylor expanded in x around inf 37.8%
associate-*r/37.8%
associate-/l*37.7%
Simplified37.7%
associate-/r/37.7%
Applied egg-rr37.7%
if -1.42e-154 < y < -1.10000000000000005e-205Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 58.4%
if 2.0000000000000001e-286 < y < 2.15000000000000001e-11 or 5e14 < y < 7.1999999999999999e79Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 50.5%
associate-*r/50.5%
*-commutative50.5%
associate-/l*50.5%
Simplified50.5%
if 7.1999999999999999e79 < y Initial program 100.0%
Taylor expanded in y around inf 65.1%
Final simplification47.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* x 0.5) t)) (t_2 (/ z (/ t -0.5))))
(if (<= y -7e-153)
t_1
(if (<= y -1.08e-197)
(* z (/ -0.5 t))
(if (<= y 4.8e-291)
t_1
(if (<= y 3.7e-14)
t_2
(if (<= y 4.8e+14)
(* x (/ 0.5 t))
(if (<= y 7e+79) t_2 (/ y (* t 2.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) / t;
double t_2 = z / (t / -0.5);
double tmp;
if (y <= -7e-153) {
tmp = t_1;
} else if (y <= -1.08e-197) {
tmp = z * (-0.5 / t);
} else if (y <= 4.8e-291) {
tmp = t_1;
} else if (y <= 3.7e-14) {
tmp = t_2;
} else if (y <= 4.8e+14) {
tmp = x * (0.5 / t);
} else if (y <= 7e+79) {
tmp = t_2;
} else {
tmp = y / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * 0.5d0) / t
t_2 = z / (t / (-0.5d0))
if (y <= (-7d-153)) then
tmp = t_1
else if (y <= (-1.08d-197)) then
tmp = z * ((-0.5d0) / t)
else if (y <= 4.8d-291) then
tmp = t_1
else if (y <= 3.7d-14) then
tmp = t_2
else if (y <= 4.8d+14) then
tmp = x * (0.5d0 / t)
else if (y <= 7d+79) then
tmp = t_2
else
tmp = y / (t * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) / t;
double t_2 = z / (t / -0.5);
double tmp;
if (y <= -7e-153) {
tmp = t_1;
} else if (y <= -1.08e-197) {
tmp = z * (-0.5 / t);
} else if (y <= 4.8e-291) {
tmp = t_1;
} else if (y <= 3.7e-14) {
tmp = t_2;
} else if (y <= 4.8e+14) {
tmp = x * (0.5 / t);
} else if (y <= 7e+79) {
tmp = t_2;
} else {
tmp = y / (t * 2.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) / t t_2 = z / (t / -0.5) tmp = 0 if y <= -7e-153: tmp = t_1 elif y <= -1.08e-197: tmp = z * (-0.5 / t) elif y <= 4.8e-291: tmp = t_1 elif y <= 3.7e-14: tmp = t_2 elif y <= 4.8e+14: tmp = x * (0.5 / t) elif y <= 7e+79: tmp = t_2 else: tmp = y / (t * 2.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) / t) t_2 = Float64(z / Float64(t / -0.5)) tmp = 0.0 if (y <= -7e-153) tmp = t_1; elseif (y <= -1.08e-197) tmp = Float64(z * Float64(-0.5 / t)); elseif (y <= 4.8e-291) tmp = t_1; elseif (y <= 3.7e-14) tmp = t_2; elseif (y <= 4.8e+14) tmp = Float64(x * Float64(0.5 / t)); elseif (y <= 7e+79) tmp = t_2; else tmp = Float64(y / Float64(t * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) / t; t_2 = z / (t / -0.5); tmp = 0.0; if (y <= -7e-153) tmp = t_1; elseif (y <= -1.08e-197) tmp = z * (-0.5 / t); elseif (y <= 4.8e-291) tmp = t_1; elseif (y <= 3.7e-14) tmp = t_2; elseif (y <= 4.8e+14) tmp = x * (0.5 / t); elseif (y <= 7e+79) tmp = t_2; else tmp = y / (t * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[(t / -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e-153], t$95$1, If[LessEqual[y, -1.08e-197], N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-291], t$95$1, If[LessEqual[y, 3.7e-14], t$95$2, If[LessEqual[y, 4.8e+14], N[(x * N[(0.5 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+79], t$95$2, N[(y / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot 0.5}{t}\\
t_2 := \frac{z}{\frac{t}{-0.5}}\\
\mathbf{if}\;y \leq -7 \cdot 10^{-153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.08 \cdot 10^{-197}:\\
\;\;\;\;z \cdot \frac{-0.5}{t}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-291}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \frac{0.5}{t}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+79}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t \cdot 2}\\
\end{array}
\end{array}
if y < -6.99999999999999961e-153 or -1.0800000000000001e-197 < y < 4.80000000000000025e-291Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 36.8%
*-commutative36.8%
associate-*l/36.8%
Simplified36.8%
if -6.99999999999999961e-153 < y < -1.0800000000000001e-197Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 64.9%
if 4.80000000000000025e-291 < y < 3.70000000000000001e-14 or 4.8e14 < y < 6.99999999999999961e79Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 50.5%
associate-*r/50.5%
*-commutative50.5%
associate-/l*50.5%
Simplified50.5%
if 3.70000000000000001e-14 < y < 4.8e14Initial program 99.8%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around inf 54.0%
associate-*r/54.0%
associate-/l*53.8%
Simplified53.8%
associate-/r/54.0%
Applied egg-rr54.0%
if 6.99999999999999961e79 < y Initial program 100.0%
Taylor expanded in y around inf 65.1%
Final simplification47.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (- x z) (* t 2.0))))
(if (<= x -9.5e+86)
t_1
(if (<= x -1.15e+33)
(* (+ x y) (/ 0.5 t))
(if (or (<= x -0.00076) (and (not (<= x -2.45e-46)) (<= x -1.95e-72)))
t_1
(* (/ -0.5 t) (- z y)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - z) / (t * 2.0);
double tmp;
if (x <= -9.5e+86) {
tmp = t_1;
} else if (x <= -1.15e+33) {
tmp = (x + y) * (0.5 / t);
} else if ((x <= -0.00076) || (!(x <= -2.45e-46) && (x <= -1.95e-72))) {
tmp = t_1;
} else {
tmp = (-0.5 / t) * (z - 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) :: t_1
real(8) :: tmp
t_1 = (x - z) / (t * 2.0d0)
if (x <= (-9.5d+86)) then
tmp = t_1
else if (x <= (-1.15d+33)) then
tmp = (x + y) * (0.5d0 / t)
else if ((x <= (-0.00076d0)) .or. (.not. (x <= (-2.45d-46))) .and. (x <= (-1.95d-72))) then
tmp = t_1
else
tmp = ((-0.5d0) / t) * (z - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - z) / (t * 2.0);
double tmp;
if (x <= -9.5e+86) {
tmp = t_1;
} else if (x <= -1.15e+33) {
tmp = (x + y) * (0.5 / t);
} else if ((x <= -0.00076) || (!(x <= -2.45e-46) && (x <= -1.95e-72))) {
tmp = t_1;
} else {
tmp = (-0.5 / t) * (z - y);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - z) / (t * 2.0) tmp = 0 if x <= -9.5e+86: tmp = t_1 elif x <= -1.15e+33: tmp = (x + y) * (0.5 / t) elif (x <= -0.00076) or (not (x <= -2.45e-46) and (x <= -1.95e-72)): tmp = t_1 else: tmp = (-0.5 / t) * (z - y) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - z) / Float64(t * 2.0)) tmp = 0.0 if (x <= -9.5e+86) tmp = t_1; elseif (x <= -1.15e+33) tmp = Float64(Float64(x + y) * Float64(0.5 / t)); elseif ((x <= -0.00076) || (!(x <= -2.45e-46) && (x <= -1.95e-72))) tmp = t_1; else tmp = Float64(Float64(-0.5 / t) * Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - z) / (t * 2.0); tmp = 0.0; if (x <= -9.5e+86) tmp = t_1; elseif (x <= -1.15e+33) tmp = (x + y) * (0.5 / t); elseif ((x <= -0.00076) || (~((x <= -2.45e-46)) && (x <= -1.95e-72))) tmp = t_1; else tmp = (-0.5 / t) * (z - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.5e+86], t$95$1, If[LessEqual[x, -1.15e+33], N[(N[(x + y), $MachinePrecision] * N[(0.5 / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -0.00076], And[N[Not[LessEqual[x, -2.45e-46]], $MachinePrecision], LessEqual[x, -1.95e-72]]], t$95$1, N[(N[(-0.5 / t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - z}{t \cdot 2}\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{+33}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{0.5}{t}\\
\mathbf{elif}\;x \leq -0.00076 \lor \neg \left(x \leq -2.45 \cdot 10^{-46}\right) \land x \leq -1.95 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.5}{t} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if x < -9.50000000000000028e86 or -1.15000000000000005e33 < x < -7.6000000000000004e-4 or -2.45e-46 < x < -1.95e-72Initial program 100.0%
Taylor expanded in y around 0 92.3%
if -9.50000000000000028e86 < x < -1.15000000000000005e33Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 98.5%
*-commutative98.5%
+-commutative98.5%
associate-*l/98.5%
associate-*r/98.4%
+-commutative98.4%
Simplified98.4%
if -7.6000000000000004e-4 < x < -2.45e-46 or -1.95e-72 < x Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 76.1%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -8.8e+163) (and (not (<= x -3e+81)) (<= x -4.2e+43))) (* (+ x y) (/ 0.5 t)) (* (/ -0.5 t) (- z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.8e+163) || (!(x <= -3e+81) && (x <= -4.2e+43))) {
tmp = (x + y) * (0.5 / t);
} else {
tmp = (-0.5 / t) * (z - 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 <= (-8.8d+163)) .or. (.not. (x <= (-3d+81))) .and. (x <= (-4.2d+43))) then
tmp = (x + y) * (0.5d0 / t)
else
tmp = ((-0.5d0) / t) * (z - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.8e+163) || (!(x <= -3e+81) && (x <= -4.2e+43))) {
tmp = (x + y) * (0.5 / t);
} else {
tmp = (-0.5 / t) * (z - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -8.8e+163) or (not (x <= -3e+81) and (x <= -4.2e+43)): tmp = (x + y) * (0.5 / t) else: tmp = (-0.5 / t) * (z - y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -8.8e+163) || (!(x <= -3e+81) && (x <= -4.2e+43))) tmp = Float64(Float64(x + y) * Float64(0.5 / t)); else tmp = Float64(Float64(-0.5 / t) * Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -8.8e+163) || (~((x <= -3e+81)) && (x <= -4.2e+43))) tmp = (x + y) * (0.5 / t); else tmp = (-0.5 / t) * (z - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.8e+163], And[N[Not[LessEqual[x, -3e+81]], $MachinePrecision], LessEqual[x, -4.2e+43]]], N[(N[(x + y), $MachinePrecision] * N[(0.5 / t), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 / t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+163} \lor \neg \left(x \leq -3 \cdot 10^{+81}\right) \land x \leq -4.2 \cdot 10^{+43}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{0.5}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.5}{t} \cdot \left(z - y\right)\\
\end{array}
\end{array}
if x < -8.79999999999999945e163 or -2.99999999999999997e81 < x < -4.20000000000000003e43Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 97.0%
*-commutative97.0%
+-commutative97.0%
associate-*l/97.0%
associate-*r/96.7%
+-commutative96.7%
Simplified96.7%
if -8.79999999999999945e163 < x < -2.99999999999999997e81 or -4.20000000000000003e43 < x Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 75.4%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1e+164) (and (not (<= x -2.2e+81)) (<= x -3e+43))) (* x (/ 0.5 t)) (* z (/ -0.5 t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1e+164) || (!(x <= -2.2e+81) && (x <= -3e+43))) {
tmp = x * (0.5 / 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 <= (-1d+164)) .or. (.not. (x <= (-2.2d+81))) .and. (x <= (-3d+43))) then
tmp = x * (0.5d0 / 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 <= -1e+164) || (!(x <= -2.2e+81) && (x <= -3e+43))) {
tmp = x * (0.5 / t);
} else {
tmp = z * (-0.5 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1e+164) or (not (x <= -2.2e+81) and (x <= -3e+43)): tmp = x * (0.5 / t) else: tmp = z * (-0.5 / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1e+164) || (!(x <= -2.2e+81) && (x <= -3e+43))) tmp = Float64(x * Float64(0.5 / 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 <= -1e+164) || (~((x <= -2.2e+81)) && (x <= -3e+43))) tmp = x * (0.5 / t); else tmp = z * (-0.5 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1e+164], And[N[Not[LessEqual[x, -2.2e+81]], $MachinePrecision], LessEqual[x, -3e+43]]], N[(x * N[(0.5 / t), $MachinePrecision]), $MachinePrecision], N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+164} \lor \neg \left(x \leq -2.2 \cdot 10^{+81}\right) \land x \leq -3 \cdot 10^{+43}:\\
\;\;\;\;x \cdot \frac{0.5}{t}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{-0.5}{t}\\
\end{array}
\end{array}
if x < -1e164 or -2.19999999999999987e81 < x < -3.00000000000000017e43Initial program 100.0%
Taylor expanded in y around 0 97.4%
Taylor expanded in x around inf 90.1%
associate-*r/90.1%
associate-/l*89.6%
Simplified89.6%
associate-/r/89.8%
Applied egg-rr89.8%
if -1e164 < x < -2.19999999999999987e81 or -3.00000000000000017e43 < x Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 46.1%
Final simplification52.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ 0.5 t))))
(if (<= x -8.8e+163)
t_1
(if (<= x -1.8e+81)
(/ -0.5 (/ t z))
(if (<= x -3.5e+43) t_1 (* z (/ -0.5 t)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (0.5 / t);
double tmp;
if (x <= -8.8e+163) {
tmp = t_1;
} else if (x <= -1.8e+81) {
tmp = -0.5 / (t / z);
} else if (x <= -3.5e+43) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (0.5d0 / t)
if (x <= (-8.8d+163)) then
tmp = t_1
else if (x <= (-1.8d+81)) then
tmp = (-0.5d0) / (t / z)
else if (x <= (-3.5d+43)) then
tmp = t_1
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 t_1 = x * (0.5 / t);
double tmp;
if (x <= -8.8e+163) {
tmp = t_1;
} else if (x <= -1.8e+81) {
tmp = -0.5 / (t / z);
} else if (x <= -3.5e+43) {
tmp = t_1;
} else {
tmp = z * (-0.5 / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (0.5 / t) tmp = 0 if x <= -8.8e+163: tmp = t_1 elif x <= -1.8e+81: tmp = -0.5 / (t / z) elif x <= -3.5e+43: tmp = t_1 else: tmp = z * (-0.5 / t) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(0.5 / t)) tmp = 0.0 if (x <= -8.8e+163) tmp = t_1; elseif (x <= -1.8e+81) tmp = Float64(-0.5 / Float64(t / z)); elseif (x <= -3.5e+43) tmp = t_1; else tmp = Float64(z * Float64(-0.5 / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (0.5 / t); tmp = 0.0; if (x <= -8.8e+163) tmp = t_1; elseif (x <= -1.8e+81) tmp = -0.5 / (t / z); elseif (x <= -3.5e+43) tmp = t_1; else tmp = z * (-0.5 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(0.5 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.8e+163], t$95$1, If[LessEqual[x, -1.8e+81], N[(-0.5 / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.5e+43], t$95$1, N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{0.5}{t}\\
\mathbf{if}\;x \leq -8.8 \cdot 10^{+163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{+81}:\\
\;\;\;\;\frac{-0.5}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{-0.5}{t}\\
\end{array}
\end{array}
if x < -8.79999999999999945e163 or -1.80000000000000003e81 < x < -3.5000000000000001e43Initial program 100.0%
Taylor expanded in y around 0 97.4%
Taylor expanded in x around inf 90.1%
associate-*r/90.1%
associate-/l*89.6%
Simplified89.6%
associate-/r/89.8%
Applied egg-rr89.8%
if -8.79999999999999945e163 < x < -1.80000000000000003e81Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.1%
*-commutative99.1%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in z around inf 35.4%
associate-*l/35.9%
associate-/l*35.6%
Applied egg-rr35.6%
if -3.5000000000000001e43 < x Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 46.5%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.2e+104) (not (<= z 2.4e+76))) (/ z (/ t -0.5)) (* (+ x y) (/ 0.5 t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.2e+104) || !(z <= 2.4e+76)) {
tmp = z / (t / -0.5);
} else {
tmp = (x + 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) :: tmp
if ((z <= (-5.2d+104)) .or. (.not. (z <= 2.4d+76))) then
tmp = z / (t / (-0.5d0))
else
tmp = (x + y) * (0.5d0 / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.2e+104) || !(z <= 2.4e+76)) {
tmp = z / (t / -0.5);
} else {
tmp = (x + y) * (0.5 / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.2e+104) or not (z <= 2.4e+76): tmp = z / (t / -0.5) else: tmp = (x + y) * (0.5 / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.2e+104) || !(z <= 2.4e+76)) tmp = Float64(z / Float64(t / -0.5)); else tmp = Float64(Float64(x + y) * Float64(0.5 / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5.2e+104) || ~((z <= 2.4e+76))) tmp = z / (t / -0.5); else tmp = (x + y) * (0.5 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.2e+104], N[Not[LessEqual[z, 2.4e+76]], $MachinePrecision]], N[(z / N[(t / -0.5), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] * N[(0.5 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+104} \lor \neg \left(z \leq 2.4 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{z}{\frac{t}{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) \cdot \frac{0.5}{t}\\
\end{array}
\end{array}
if z < -5.20000000000000001e104 or 2.4e76 < z Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 73.8%
associate-*r/73.8%
*-commutative73.8%
associate-/l*73.8%
Simplified73.8%
if -5.20000000000000001e104 < z < 2.4e76Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 81.8%
*-commutative81.8%
+-commutative81.8%
associate-*l/81.8%
associate-*r/81.6%
+-commutative81.6%
Simplified81.6%
Final simplification78.7%
(FPCore (x y z t) :precision binary64 (* (/ -0.5 t) (- z (+ x y))))
double code(double x, double y, double z, double t) {
return (-0.5 / t) * (z - (x + 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) * (z - (x + y))
end function
public static double code(double x, double y, double z, double t) {
return (-0.5 / t) * (z - (x + y));
}
def code(x, y, z, t): return (-0.5 / t) * (z - (x + y))
function code(x, y, z, t) return Float64(Float64(-0.5 / t) * Float64(z - Float64(x + y))) end
function tmp = code(x, y, z, t) tmp = (-0.5 / t) * (z - (x + y)); end
code[x_, y_, z_, t_] := N[(N[(-0.5 / t), $MachinePrecision] * N[(z - N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-0.5}{t} \cdot \left(z - \left(x + y\right)\right)
\end{array}
Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t) :precision binary64 (* z (/ -0.5 t)))
double code(double x, double y, double z, double t) {
return z * (-0.5 / 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 = z * ((-0.5d0) / t)
end function
public static double code(double x, double y, double z, double t) {
return z * (-0.5 / t);
}
def code(x, y, z, t): return z * (-0.5 / t)
function code(x, y, z, t) return Float64(z * Float64(-0.5 / t)) end
function tmp = code(x, y, z, t) tmp = z * (-0.5 / t); end
code[x_, y_, z_, t_] := N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \frac{-0.5}{t}
\end{array}
Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
neg-sub0100.0%
associate-+l-100.0%
sub0-neg100.0%
neg-mul-1100.0%
associate-*l/99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 41.0%
Final simplification41.0%
herbie shell --seed 2023192
(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)))