
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
(FPCore (x y z t a b c) :precision binary64 (fma x y (fma b (* -0.25 a) (fma z (/ t 16.0) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, fma(b, (-0.25 * a), fma(z, (t / 16.0), c)));
}
function code(x, y, z, t, a, b, c) return fma(x, y, fma(b, Float64(-0.25 * a), fma(z, Float64(t / 16.0), c))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x * y + N[(b * N[(-0.25 * a), $MachinePrecision] + N[(z * N[(t / 16.0), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(b, -0.25 \cdot a, \mathsf{fma}\left(z, \frac{t}{16}, c\right)\right)\right)
\end{array}
Initial program 98.8%
associate-+l-98.8%
+-commutative98.8%
associate--l+98.8%
+-commutative98.8%
associate-+l-98.8%
fma-neg99.2%
neg-sub099.2%
associate--l-99.2%
associate-+l-99.2%
neg-sub099.2%
*-commutative99.2%
associate-*r/99.2%
distribute-rgt-neg-in99.2%
fma-def99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
associate-/l*99.5%
associate-/r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b c) :precision binary64 (fma t (/ z 16.0) (fma x y (- c (* b (/ a 4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(t, (z / 16.0), fma(x, y, (c - (b * (a / 4.0)))));
}
function code(x, y, z, t, a, b, c) return fma(t, Float64(z / 16.0), fma(x, y, Float64(c - Float64(b * Float64(a / 4.0))))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(t * N[(z / 16.0), $MachinePrecision] + N[(x * y + N[(c - N[(b * N[(a / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - b \cdot \frac{a}{4}\right)\right)
\end{array}
Initial program 98.8%
associate-+l-98.8%
+-commutative98.8%
associate--l+98.8%
associate-*l/98.8%
*-commutative98.8%
fma-def98.8%
fma-neg99.2%
neg-sub099.2%
associate-+l-99.2%
neg-sub099.2%
+-commutative99.2%
unsub-neg99.2%
*-commutative99.2%
associate-*r/99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (- (* x y) (* (* b a) 0.25))))
(if (<= (* b a) -1e+163)
t_2
(if (<= (* b a) -4e-82)
(+ c t_1)
(if (<= (* b a) -1e-214)
(+ (* x y) t_1)
(if (<= (* b a) 2e+94) (+ c (* x y)) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (x * y) - ((b * a) * 0.25);
double tmp;
if ((b * a) <= -1e+163) {
tmp = t_2;
} else if ((b * a) <= -4e-82) {
tmp = c + t_1;
} else if ((b * a) <= -1e-214) {
tmp = (x * y) + t_1;
} else if ((b * a) <= 2e+94) {
tmp = c + (x * y);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = (x * y) - ((b * a) * 0.25d0)
if ((b * a) <= (-1d+163)) then
tmp = t_2
else if ((b * a) <= (-4d-82)) then
tmp = c + t_1
else if ((b * a) <= (-1d-214)) then
tmp = (x * y) + t_1
else if ((b * a) <= 2d+94) then
tmp = c + (x * y)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (x * y) - ((b * a) * 0.25);
double tmp;
if ((b * a) <= -1e+163) {
tmp = t_2;
} else if ((b * a) <= -4e-82) {
tmp = c + t_1;
} else if ((b * a) <= -1e-214) {
tmp = (x * y) + t_1;
} else if ((b * a) <= 2e+94) {
tmp = c + (x * y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (x * y) - ((b * a) * 0.25) tmp = 0 if (b * a) <= -1e+163: tmp = t_2 elif (b * a) <= -4e-82: tmp = c + t_1 elif (b * a) <= -1e-214: tmp = (x * y) + t_1 elif (b * a) <= 2e+94: tmp = c + (x * y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)) tmp = 0.0 if (Float64(b * a) <= -1e+163) tmp = t_2; elseif (Float64(b * a) <= -4e-82) tmp = Float64(c + t_1); elseif (Float64(b * a) <= -1e-214) tmp = Float64(Float64(x * y) + t_1); elseif (Float64(b * a) <= 2e+94) tmp = Float64(c + Float64(x * y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (x * y) - ((b * a) * 0.25); tmp = 0.0; if ((b * a) <= -1e+163) tmp = t_2; elseif ((b * a) <= -4e-82) tmp = c + t_1; elseif ((b * a) <= -1e-214) tmp = (x * y) + t_1; elseif ((b * a) <= 2e+94) tmp = c + (x * y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+163], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -4e-82], N[(c + t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], -1e-214], N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+94], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+163}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -4 \cdot 10^{-82}:\\
\;\;\;\;c + t_1\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-214}:\\
\;\;\;\;x \cdot y + t_1\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+94}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -9.9999999999999994e162 or 2e94 < (*.f64 a b) Initial program 96.0%
associate-+l-96.0%
sub-neg96.0%
neg-mul-196.0%
metadata-eval96.0%
metadata-eval96.0%
cancel-sign-sub-inv96.0%
fma-def96.0%
associate-/l*96.0%
metadata-eval96.0%
*-lft-identity96.0%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in z around 0 87.3%
Taylor expanded in c around 0 83.7%
if -9.9999999999999994e162 < (*.f64 a b) < -4e-82Initial program 100.0%
Taylor expanded in z around inf 68.1%
if -4e-82 < (*.f64 a b) < -9.99999999999999913e-215Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate--l+100.0%
associate-*l/100.0%
*-commutative100.0%
fma-def100.0%
fma-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
*-commutative100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in b around 0 94.9%
Taylor expanded in c around 0 89.6%
if -9.99999999999999913e-215 < (*.f64 a b) < 2e94Initial program 100.0%
Taylor expanded in x around inf 72.5%
Final simplification76.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (* 0.0625 (* z t)))))
(if (or (<= (* b a) -5e+111) (not (<= (* b a) 2e+94)))
(- t_1 (* (* b a) 0.25))
(+ c t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + (0.0625 * (z * t));
double tmp;
if (((b * a) <= -5e+111) || !((b * a) <= 2e+94)) {
tmp = t_1 - ((b * a) * 0.25);
} else {
tmp = c + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) + (0.0625d0 * (z * t))
if (((b * a) <= (-5d+111)) .or. (.not. ((b * a) <= 2d+94))) then
tmp = t_1 - ((b * a) * 0.25d0)
else
tmp = c + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + (0.0625 * (z * t));
double tmp;
if (((b * a) <= -5e+111) || !((b * a) <= 2e+94)) {
tmp = t_1 - ((b * a) * 0.25);
} else {
tmp = c + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + (0.0625 * (z * t)) tmp = 0 if ((b * a) <= -5e+111) or not ((b * a) <= 2e+94): tmp = t_1 - ((b * a) * 0.25) else: tmp = c + t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))) tmp = 0.0 if ((Float64(b * a) <= -5e+111) || !(Float64(b * a) <= 2e+94)) tmp = Float64(t_1 - Float64(Float64(b * a) * 0.25)); else tmp = Float64(c + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + (0.0625 * (z * t)); tmp = 0.0; if (((b * a) <= -5e+111) || ~(((b * a) <= 2e+94))) tmp = t_1 - ((b * a) * 0.25); else tmp = c + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(b * a), $MachinePrecision], -5e+111], N[Not[LessEqual[N[(b * a), $MachinePrecision], 2e+94]], $MachinePrecision]], N[(t$95$1 - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+111} \lor \neg \left(b \cdot a \leq 2 \cdot 10^{+94}\right):\\
\;\;\;\;t_1 - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999997e111 or 2e94 < (*.f64 a b) Initial program 96.4%
associate-+l-96.4%
sub-neg96.4%
neg-mul-196.4%
metadata-eval96.4%
metadata-eval96.4%
cancel-sign-sub-inv96.4%
fma-def96.4%
associate-/l*96.3%
metadata-eval96.3%
*-lft-identity96.3%
associate-/l*96.2%
Simplified96.2%
fma-udef96.2%
associate-/l*96.3%
+-commutative96.3%
associate-/l*96.2%
div-inv96.3%
clear-num96.3%
div-inv96.3%
metadata-eval96.3%
Applied egg-rr96.3%
Taylor expanded in c around 0 93.2%
if -4.9999999999999997e111 < (*.f64 a b) < 2e94Initial program 100.0%
Taylor expanded in a around 0 96.8%
Final simplification95.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* b a) -1e+163)
(- (* x y) (* (* b a) 0.25))
(if (<= (* b a) 2e+232)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(+ c (* b (* -0.25 a))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b * a) <= -1e+163) {
tmp = (x * y) - ((b * a) * 0.25);
} else if ((b * a) <= 2e+232) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + (b * (-0.25 * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b * a) <= (-1d+163)) then
tmp = (x * y) - ((b * a) * 0.25d0)
else if ((b * a) <= 2d+232) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = c + (b * ((-0.25d0) * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b * a) <= -1e+163) {
tmp = (x * y) - ((b * a) * 0.25);
} else if ((b * a) <= 2e+232) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + (b * (-0.25 * a));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b * a) <= -1e+163: tmp = (x * y) - ((b * a) * 0.25) elif (b * a) <= 2e+232: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = c + (b * (-0.25 * a)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b * a) <= -1e+163) tmp = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)); elseif (Float64(b * a) <= 2e+232) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(c + Float64(b * Float64(-0.25 * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b * a) <= -1e+163) tmp = (x * y) - ((b * a) * 0.25); elseif ((b * a) <= 2e+232) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = c + (b * (-0.25 * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b * a), $MachinePrecision], -1e+163], N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+232], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+163}:\\
\;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+232}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(-0.25 \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -9.9999999999999994e162Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
neg-mul-199.9%
metadata-eval99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
fma-def99.9%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 92.6%
Taylor expanded in c around 0 89.7%
if -9.9999999999999994e162 < (*.f64 a b) < 2.00000000000000011e232Initial program 100.0%
Taylor expanded in a around 0 93.6%
if 2.00000000000000011e232 < (*.f64 a b) Initial program 88.0%
Taylor expanded in a around inf 88.0%
*-commutative88.0%
*-commutative88.0%
associate-*r*88.0%
Simplified88.0%
Final simplification92.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= (* b a) -5e+111)
(- t_1 (* (* b a) 0.25))
(if (<= (* b a) 2e+232) (+ c (+ (* x y) t_1)) (+ c (* b (* -0.25 a)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if ((b * a) <= -5e+111) {
tmp = t_1 - ((b * a) * 0.25);
} else if ((b * a) <= 2e+232) {
tmp = c + ((x * y) + t_1);
} else {
tmp = c + (b * (-0.25 * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
if ((b * a) <= (-5d+111)) then
tmp = t_1 - ((b * a) * 0.25d0)
else if ((b * a) <= 2d+232) then
tmp = c + ((x * y) + t_1)
else
tmp = c + (b * ((-0.25d0) * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if ((b * a) <= -5e+111) {
tmp = t_1 - ((b * a) * 0.25);
} else if ((b * a) <= 2e+232) {
tmp = c + ((x * y) + t_1);
} else {
tmp = c + (b * (-0.25 * a));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if (b * a) <= -5e+111: tmp = t_1 - ((b * a) * 0.25) elif (b * a) <= 2e+232: tmp = c + ((x * y) + t_1) else: tmp = c + (b * (-0.25 * a)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(b * a) <= -5e+111) tmp = Float64(t_1 - Float64(Float64(b * a) * 0.25)); elseif (Float64(b * a) <= 2e+232) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(c + Float64(b * Float64(-0.25 * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); tmp = 0.0; if ((b * a) <= -5e+111) tmp = t_1 - ((b * a) * 0.25); elseif ((b * a) <= 2e+232) tmp = c + ((x * y) + t_1); else tmp = c + (b * (-0.25 * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+111], N[(t$95$1 - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+232], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+111}:\\
\;\;\;\;t_1 - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+232}:\\
\;\;\;\;c + \left(x \cdot y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(-0.25 \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999997e111Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
neg-mul-199.9%
metadata-eval99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
fma-def99.9%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 96.1%
Taylor expanded in c around 0 93.7%
if -4.9999999999999997e111 < (*.f64 a b) < 2.00000000000000011e232Initial program 100.0%
Taylor expanded in a around 0 95.0%
if 2.00000000000000011e232 < (*.f64 a b) Initial program 88.0%
Taylor expanded in a around inf 88.0%
*-commutative88.0%
*-commutative88.0%
associate-*r*88.0%
Simplified88.0%
Final simplification94.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) 0.25)) (t_2 (* 0.0625 (* z t))))
(if (<= (* b a) -5e+111)
(- t_2 t_1)
(if (<= (* b a) 1e+192) (+ c (+ (* x y) t_2)) (- (+ c (* x y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((b * a) <= -5e+111) {
tmp = t_2 - t_1;
} else if ((b * a) <= 1e+192) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (c + (x * y)) - t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * a) * 0.25d0
t_2 = 0.0625d0 * (z * t)
if ((b * a) <= (-5d+111)) then
tmp = t_2 - t_1
else if ((b * a) <= 1d+192) then
tmp = c + ((x * y) + t_2)
else
tmp = (c + (x * y)) - t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((b * a) <= -5e+111) {
tmp = t_2 - t_1;
} else if ((b * a) <= 1e+192) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (c + (x * y)) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * 0.25 t_2 = 0.0625 * (z * t) tmp = 0 if (b * a) <= -5e+111: tmp = t_2 - t_1 elif (b * a) <= 1e+192: tmp = c + ((x * y) + t_2) else: tmp = (c + (x * y)) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * 0.25) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(b * a) <= -5e+111) tmp = Float64(t_2 - t_1); elseif (Float64(b * a) <= 1e+192) tmp = Float64(c + Float64(Float64(x * y) + t_2)); else tmp = Float64(Float64(c + Float64(x * y)) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b * a) * 0.25; t_2 = 0.0625 * (z * t); tmp = 0.0; if ((b * a) <= -5e+111) tmp = t_2 - t_1; elseif ((b * a) <= 1e+192) tmp = c + ((x * y) + t_2); else tmp = (c + (x * y)) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+111], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 1e+192], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot 0.25\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+111}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{+192}:\\
\;\;\;\;c + \left(x \cdot y + t_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999997e111Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
neg-mul-199.9%
metadata-eval99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
fma-def99.9%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 96.1%
Taylor expanded in c around 0 93.7%
if -4.9999999999999997e111 < (*.f64 a b) < 1.00000000000000004e192Initial program 100.0%
Taylor expanded in a around 0 95.4%
if 1.00000000000000004e192 < (*.f64 a b) Initial program 89.3%
associate-+l-89.3%
sub-neg89.3%
neg-mul-189.3%
metadata-eval89.3%
metadata-eval89.3%
cancel-sign-sub-inv89.3%
fma-def89.3%
associate-/l*89.3%
metadata-eval89.3%
*-lft-identity89.3%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in z around 0 89.3%
Final simplification94.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (* (* b a) 0.25)))
(if (<= (* b a) -5e+111)
(- (+ c t_1) t_2)
(if (<= (* b a) 1e+192) (+ c (+ (* x y) t_1)) (- (+ c (* x y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (b * a) * 0.25;
double tmp;
if ((b * a) <= -5e+111) {
tmp = (c + t_1) - t_2;
} else if ((b * a) <= 1e+192) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + (x * y)) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.0625d0 * (z * t)
t_2 = (b * a) * 0.25d0
if ((b * a) <= (-5d+111)) then
tmp = (c + t_1) - t_2
else if ((b * a) <= 1d+192) then
tmp = c + ((x * y) + t_1)
else
tmp = (c + (x * y)) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (b * a) * 0.25;
double tmp;
if ((b * a) <= -5e+111) {
tmp = (c + t_1) - t_2;
} else if ((b * a) <= 1e+192) {
tmp = c + ((x * y) + t_1);
} else {
tmp = (c + (x * y)) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (b * a) * 0.25 tmp = 0 if (b * a) <= -5e+111: tmp = (c + t_1) - t_2 elif (b * a) <= 1e+192: tmp = c + ((x * y) + t_1) else: tmp = (c + (x * y)) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(b * a) * 0.25) tmp = 0.0 if (Float64(b * a) <= -5e+111) tmp = Float64(Float64(c + t_1) - t_2); elseif (Float64(b * a) <= 1e+192) tmp = Float64(c + Float64(Float64(x * y) + t_1)); else tmp = Float64(Float64(c + Float64(x * y)) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (b * a) * 0.25; tmp = 0.0; if ((b * a) <= -5e+111) tmp = (c + t_1) - t_2; elseif ((b * a) <= 1e+192) tmp = c + ((x * y) + t_1); else tmp = (c + (x * y)) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+111], N[(N[(c + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 1e+192], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := \left(b \cdot a\right) \cdot 0.25\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+111}:\\
\;\;\;\;\left(c + t_1\right) - t_2\\
\mathbf{elif}\;b \cdot a \leq 10^{+192}:\\
\;\;\;\;c + \left(x \cdot y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999997e111Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
neg-mul-199.9%
metadata-eval99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
fma-def99.9%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 96.1%
if -4.9999999999999997e111 < (*.f64 a b) < 1.00000000000000004e192Initial program 100.0%
Taylor expanded in a around 0 95.4%
if 1.00000000000000004e192 < (*.f64 a b) Initial program 89.3%
associate-+l-89.3%
sub-neg89.3%
neg-mul-189.3%
metadata-eval89.3%
metadata-eval89.3%
cancel-sign-sub-inv89.3%
fma-def89.3%
associate-/l*89.3%
metadata-eval89.3%
*-lft-identity89.3%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in z around 0 89.3%
Final simplification94.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* 0.0625 (* z t))) (t_3 (* b (* -0.25 a))))
(if (<= b -255000000.0)
t_3
(if (<= b 4.5e-156)
t_1
(if (<= b 2.15e-122)
t_2
(if (<= b 4e+149)
t_1
(if (<= b 1.4e+159) t_2 (if (<= b 6.5e+188) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = 0.0625 * (z * t);
double t_3 = b * (-0.25 * a);
double tmp;
if (b <= -255000000.0) {
tmp = t_3;
} else if (b <= 4.5e-156) {
tmp = t_1;
} else if (b <= 2.15e-122) {
tmp = t_2;
} else if (b <= 4e+149) {
tmp = t_1;
} else if (b <= 1.4e+159) {
tmp = t_2;
} else if (b <= 6.5e+188) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (x * y)
t_2 = 0.0625d0 * (z * t)
t_3 = b * ((-0.25d0) * a)
if (b <= (-255000000.0d0)) then
tmp = t_3
else if (b <= 4.5d-156) then
tmp = t_1
else if (b <= 2.15d-122) then
tmp = t_2
else if (b <= 4d+149) then
tmp = t_1
else if (b <= 1.4d+159) then
tmp = t_2
else if (b <= 6.5d+188) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = 0.0625 * (z * t);
double t_3 = b * (-0.25 * a);
double tmp;
if (b <= -255000000.0) {
tmp = t_3;
} else if (b <= 4.5e-156) {
tmp = t_1;
} else if (b <= 2.15e-122) {
tmp = t_2;
} else if (b <= 4e+149) {
tmp = t_1;
} else if (b <= 1.4e+159) {
tmp = t_2;
} else if (b <= 6.5e+188) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = 0.0625 * (z * t) t_3 = b * (-0.25 * a) tmp = 0 if b <= -255000000.0: tmp = t_3 elif b <= 4.5e-156: tmp = t_1 elif b <= 2.15e-122: tmp = t_2 elif b <= 4e+149: tmp = t_1 elif b <= 1.4e+159: tmp = t_2 elif b <= 6.5e+188: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(0.0625 * Float64(z * t)) t_3 = Float64(b * Float64(-0.25 * a)) tmp = 0.0 if (b <= -255000000.0) tmp = t_3; elseif (b <= 4.5e-156) tmp = t_1; elseif (b <= 2.15e-122) tmp = t_2; elseif (b <= 4e+149) tmp = t_1; elseif (b <= 1.4e+159) tmp = t_2; elseif (b <= 6.5e+188) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = 0.0625 * (z * t); t_3 = b * (-0.25 * a); tmp = 0.0; if (b <= -255000000.0) tmp = t_3; elseif (b <= 4.5e-156) tmp = t_1; elseif (b <= 2.15e-122) tmp = t_2; elseif (b <= 4e+149) tmp = t_1; elseif (b <= 1.4e+159) tmp = t_2; elseif (b <= 6.5e+188) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -255000000.0], t$95$3, If[LessEqual[b, 4.5e-156], t$95$1, If[LessEqual[b, 2.15e-122], t$95$2, If[LessEqual[b, 4e+149], t$95$1, If[LessEqual[b, 1.4e+159], t$95$2, If[LessEqual[b, 6.5e+188], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := b \cdot \left(-0.25 \cdot a\right)\\
\mathbf{if}\;b \leq -255000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{-156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.15 \cdot 10^{-122}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{+159}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+188}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if b < -2.55e8 or 6.49999999999999953e188 < b Initial program 97.0%
associate-+l-97.0%
sub-neg97.0%
neg-mul-197.0%
metadata-eval97.0%
metadata-eval97.0%
cancel-sign-sub-inv97.0%
fma-def97.0%
associate-/l*96.9%
metadata-eval96.9%
*-lft-identity96.9%
associate-/l*96.8%
Simplified96.8%
fma-udef96.8%
associate-/l*96.9%
+-commutative96.9%
associate-/l*96.8%
div-inv96.9%
clear-num96.9%
div-inv96.9%
metadata-eval96.9%
Applied egg-rr96.9%
Taylor expanded in a around inf 52.1%
associate-*r*52.1%
*-commutative52.1%
*-commutative52.1%
Simplified52.1%
if -2.55e8 < b < 4.49999999999999986e-156 or 2.15000000000000009e-122 < b < 4.0000000000000002e149 or 1.4000000000000001e159 < b < 6.49999999999999953e188Initial program 100.0%
Taylor expanded in x around inf 62.7%
if 4.49999999999999986e-156 < b < 2.15000000000000009e-122 or 4.0000000000000002e149 < b < 1.4000000000000001e159Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*99.8%
metadata-eval99.8%
*-lft-identity99.8%
associate-/l*99.8%
Simplified99.8%
fma-udef99.8%
associate-/l*100.0%
+-commutative100.0%
associate-/l*99.8%
div-inv99.9%
clear-num100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 52.2%
Final simplification58.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* b (* -0.25 a))))
(t_2 (* 0.0625 (* z t)))
(t_3 (+ (* x y) t_2)))
(if (<= y -1.7e-134)
t_3
(if (<= y 3.5e-154)
t_1
(if (<= y 2.7e+87) (+ c t_2) (if (<= y 5.2e+119) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (b * (-0.25 * a));
double t_2 = 0.0625 * (z * t);
double t_3 = (x * y) + t_2;
double tmp;
if (y <= -1.7e-134) {
tmp = t_3;
} else if (y <= 3.5e-154) {
tmp = t_1;
} else if (y <= 2.7e+87) {
tmp = c + t_2;
} else if (y <= 5.2e+119) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (b * ((-0.25d0) * a))
t_2 = 0.0625d0 * (z * t)
t_3 = (x * y) + t_2
if (y <= (-1.7d-134)) then
tmp = t_3
else if (y <= 3.5d-154) then
tmp = t_1
else if (y <= 2.7d+87) then
tmp = c + t_2
else if (y <= 5.2d+119) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (b * (-0.25 * a));
double t_2 = 0.0625 * (z * t);
double t_3 = (x * y) + t_2;
double tmp;
if (y <= -1.7e-134) {
tmp = t_3;
} else if (y <= 3.5e-154) {
tmp = t_1;
} else if (y <= 2.7e+87) {
tmp = c + t_2;
} else if (y <= 5.2e+119) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (b * (-0.25 * a)) t_2 = 0.0625 * (z * t) t_3 = (x * y) + t_2 tmp = 0 if y <= -1.7e-134: tmp = t_3 elif y <= 3.5e-154: tmp = t_1 elif y <= 2.7e+87: tmp = c + t_2 elif y <= 5.2e+119: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(b * Float64(-0.25 * a))) t_2 = Float64(0.0625 * Float64(z * t)) t_3 = Float64(Float64(x * y) + t_2) tmp = 0.0 if (y <= -1.7e-134) tmp = t_3; elseif (y <= 3.5e-154) tmp = t_1; elseif (y <= 2.7e+87) tmp = Float64(c + t_2); elseif (y <= 5.2e+119) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (b * (-0.25 * a)); t_2 = 0.0625 * (z * t); t_3 = (x * y) + t_2; tmp = 0.0; if (y <= -1.7e-134) tmp = t_3; elseif (y <= 3.5e-154) tmp = t_1; elseif (y <= 2.7e+87) tmp = c + t_2; elseif (y <= 5.2e+119) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[y, -1.7e-134], t$95$3, If[LessEqual[y, 3.5e-154], t$95$1, If[LessEqual[y, 2.7e+87], N[(c + t$95$2), $MachinePrecision], If[LessEqual[y, 5.2e+119], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + b \cdot \left(-0.25 \cdot a\right)\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := x \cdot y + t_2\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{-134}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+87}:\\
\;\;\;\;c + t_2\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -1.69999999999999988e-134 or 5.2e119 < y Initial program 98.5%
associate-+l-98.5%
+-commutative98.5%
associate--l+98.5%
associate-*l/98.5%
*-commutative98.5%
fma-def98.6%
fma-neg99.3%
neg-sub099.3%
associate-+l-99.3%
neg-sub099.3%
+-commutative99.3%
unsub-neg99.3%
*-commutative99.3%
associate-*r/99.3%
Simplified99.3%
Taylor expanded in b around 0 78.2%
Taylor expanded in c around 0 60.7%
if -1.69999999999999988e-134 < y < 3.5000000000000001e-154 or 2.70000000000000007e87 < y < 5.2e119Initial program 98.7%
Taylor expanded in a around inf 67.7%
*-commutative67.7%
*-commutative67.7%
associate-*r*67.7%
Simplified67.7%
if 3.5000000000000001e-154 < y < 2.70000000000000007e87Initial program 100.0%
Taylor expanded in z around inf 61.5%
Final simplification62.9%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (/ (* z t) 16.0) (* x y)) (/ (* b a) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + ((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = c + ((((z * t) / 16.0d0) + (x * y)) - ((b * a) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + ((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + ((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(Float64(z * t) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + ((((z * t) / 16.0) + (x * y)) - ((b * a) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\right)
\end{array}
Initial program 98.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* 0.0625 (* z t))))
(if (<= y -5.8e-33)
t_1
(if (<= y 2.4e-154)
(+ c (* b (* -0.25 a)))
(if (<= y 2.4e+83)
(+ c t_2)
(if (or (<= y 1.12e+163) (not (<= y 4.2e+190))) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = 0.0625 * (z * t);
double tmp;
if (y <= -5.8e-33) {
tmp = t_1;
} else if (y <= 2.4e-154) {
tmp = c + (b * (-0.25 * a));
} else if (y <= 2.4e+83) {
tmp = c + t_2;
} else if ((y <= 1.12e+163) || !(y <= 4.2e+190)) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (x * y)
t_2 = 0.0625d0 * (z * t)
if (y <= (-5.8d-33)) then
tmp = t_1
else if (y <= 2.4d-154) then
tmp = c + (b * ((-0.25d0) * a))
else if (y <= 2.4d+83) then
tmp = c + t_2
else if ((y <= 1.12d+163) .or. (.not. (y <= 4.2d+190))) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = 0.0625 * (z * t);
double tmp;
if (y <= -5.8e-33) {
tmp = t_1;
} else if (y <= 2.4e-154) {
tmp = c + (b * (-0.25 * a));
} else if (y <= 2.4e+83) {
tmp = c + t_2;
} else if ((y <= 1.12e+163) || !(y <= 4.2e+190)) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = 0.0625 * (z * t) tmp = 0 if y <= -5.8e-33: tmp = t_1 elif y <= 2.4e-154: tmp = c + (b * (-0.25 * a)) elif y <= 2.4e+83: tmp = c + t_2 elif (y <= 1.12e+163) or not (y <= 4.2e+190): tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (y <= -5.8e-33) tmp = t_1; elseif (y <= 2.4e-154) tmp = Float64(c + Float64(b * Float64(-0.25 * a))); elseif (y <= 2.4e+83) tmp = Float64(c + t_2); elseif ((y <= 1.12e+163) || !(y <= 4.2e+190)) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = 0.0625 * (z * t); tmp = 0.0; if (y <= -5.8e-33) tmp = t_1; elseif (y <= 2.4e-154) tmp = c + (b * (-0.25 * a)); elseif (y <= 2.4e+83) tmp = c + t_2; elseif ((y <= 1.12e+163) || ~((y <= 4.2e+190))) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e-33], t$95$1, If[LessEqual[y, 2.4e-154], N[(c + N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+83], N[(c + t$95$2), $MachinePrecision], If[Or[LessEqual[y, 1.12e+163], N[Not[LessEqual[y, 4.2e+190]], $MachinePrecision]], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-154}:\\
\;\;\;\;c + b \cdot \left(-0.25 \cdot a\right)\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+83}:\\
\;\;\;\;c + t_2\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+163} \lor \neg \left(y \leq 4.2 \cdot 10^{+190}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -5.80000000000000005e-33 or 2.39999999999999991e83 < y < 1.11999999999999996e163 or 4.2000000000000001e190 < y Initial program 97.4%
Taylor expanded in x around inf 62.3%
if -5.80000000000000005e-33 < y < 2.39999999999999987e-154Initial program 100.0%
Taylor expanded in a around inf 68.1%
*-commutative68.1%
*-commutative68.1%
associate-*r*68.1%
Simplified68.1%
if 2.39999999999999987e-154 < y < 2.39999999999999991e83Initial program 100.0%
Taylor expanded in z around inf 61.5%
if 1.11999999999999996e163 < y < 4.2000000000000001e190Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*100.0%
metadata-eval100.0%
*-lft-identity100.0%
associate-/l*100.0%
Simplified100.0%
fma-udef100.0%
associate-/l*100.0%
+-commutative100.0%
associate-/l*100.0%
div-inv100.0%
clear-num100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 61.3%
Final simplification64.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -2.35e+163)
(* x y)
(if (<= x -15000000.0)
(* b (* -0.25 a))
(if (<= x 6.5e-274) c (if (<= x 5.8e-28) (* 0.0625 (* z t)) (* x y))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -2.35e+163) {
tmp = x * y;
} else if (x <= -15000000.0) {
tmp = b * (-0.25 * a);
} else if (x <= 6.5e-274) {
tmp = c;
} else if (x <= 5.8e-28) {
tmp = 0.0625 * (z * t);
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (x <= (-2.35d+163)) then
tmp = x * y
else if (x <= (-15000000.0d0)) then
tmp = b * ((-0.25d0) * a)
else if (x <= 6.5d-274) then
tmp = c
else if (x <= 5.8d-28) then
tmp = 0.0625d0 * (z * t)
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -2.35e+163) {
tmp = x * y;
} else if (x <= -15000000.0) {
tmp = b * (-0.25 * a);
} else if (x <= 6.5e-274) {
tmp = c;
} else if (x <= 5.8e-28) {
tmp = 0.0625 * (z * t);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if x <= -2.35e+163: tmp = x * y elif x <= -15000000.0: tmp = b * (-0.25 * a) elif x <= 6.5e-274: tmp = c elif x <= 5.8e-28: tmp = 0.0625 * (z * t) else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -2.35e+163) tmp = Float64(x * y); elseif (x <= -15000000.0) tmp = Float64(b * Float64(-0.25 * a)); elseif (x <= 6.5e-274) tmp = c; elseif (x <= 5.8e-28) tmp = Float64(0.0625 * Float64(z * t)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (x <= -2.35e+163) tmp = x * y; elseif (x <= -15000000.0) tmp = b * (-0.25 * a); elseif (x <= 6.5e-274) tmp = c; elseif (x <= 5.8e-28) tmp = 0.0625 * (z * t); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -2.35e+163], N[(x * y), $MachinePrecision], If[LessEqual[x, -15000000.0], N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-274], c, If[LessEqual[x, 5.8e-28], N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{+163}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq -15000000:\\
\;\;\;\;b \cdot \left(-0.25 \cdot a\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-274}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-28}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if x < -2.35000000000000009e163 or 5.80000000000000026e-28 < x Initial program 96.3%
associate-+l-96.3%
sub-neg96.3%
neg-mul-196.3%
metadata-eval96.3%
metadata-eval96.3%
cancel-sign-sub-inv96.3%
fma-def96.3%
associate-/l*96.3%
metadata-eval96.3%
*-lft-identity96.3%
associate-/l*96.3%
Simplified96.3%
fma-udef96.3%
associate-/l*96.3%
+-commutative96.3%
associate-/l*96.3%
div-inv96.3%
clear-num96.3%
div-inv96.3%
metadata-eval96.3%
Applied egg-rr96.3%
Taylor expanded in x around inf 50.0%
if -2.35000000000000009e163 < x < -1.5e7Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*100.0%
metadata-eval100.0%
*-lft-identity100.0%
associate-/l*99.9%
Simplified99.9%
fma-udef99.9%
associate-/l*99.9%
+-commutative99.9%
associate-/l*99.9%
div-inv99.9%
clear-num99.9%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 35.2%
associate-*r*35.2%
*-commutative35.2%
*-commutative35.2%
Simplified35.2%
if -1.5e7 < x < 6.49999999999999959e-274Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in c around inf 43.9%
if 6.49999999999999959e-274 < x < 5.80000000000000026e-28Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
neg-mul-199.9%
metadata-eval99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
fma-def99.9%
associate-/l*99.8%
metadata-eval99.8%
*-lft-identity99.8%
associate-/l*99.8%
Simplified99.8%
fma-udef99.8%
associate-/l*100.0%
+-commutative100.0%
associate-/l*99.8%
div-inv99.9%
clear-num100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 34.5%
Final simplification42.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* -0.25 a))))
(if (<= b -300000000.0)
t_1
(if (<= b 6e-166)
(+ c (* x y))
(if (<= b 6.5e+188) (+ c (* 0.0625 (* z t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (-0.25 * a);
double tmp;
if (b <= -300000000.0) {
tmp = t_1;
} else if (b <= 6e-166) {
tmp = c + (x * y);
} else if (b <= 6.5e+188) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((-0.25d0) * a)
if (b <= (-300000000.0d0)) then
tmp = t_1
else if (b <= 6d-166) then
tmp = c + (x * y)
else if (b <= 6.5d+188) then
tmp = c + (0.0625d0 * (z * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (-0.25 * a);
double tmp;
if (b <= -300000000.0) {
tmp = t_1;
} else if (b <= 6e-166) {
tmp = c + (x * y);
} else if (b <= 6.5e+188) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (-0.25 * a) tmp = 0 if b <= -300000000.0: tmp = t_1 elif b <= 6e-166: tmp = c + (x * y) elif b <= 6.5e+188: tmp = c + (0.0625 * (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(-0.25 * a)) tmp = 0.0 if (b <= -300000000.0) tmp = t_1; elseif (b <= 6e-166) tmp = Float64(c + Float64(x * y)); elseif (b <= 6.5e+188) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b * (-0.25 * a); tmp = 0.0; if (b <= -300000000.0) tmp = t_1; elseif (b <= 6e-166) tmp = c + (x * y); elseif (b <= 6.5e+188) tmp = c + (0.0625 * (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -300000000.0], t$95$1, If[LessEqual[b, 6e-166], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e+188], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(-0.25 \cdot a\right)\\
\mathbf{if}\;b \leq -300000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-166}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+188}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -3e8 or 6.49999999999999953e188 < b Initial program 97.0%
associate-+l-97.0%
sub-neg97.0%
neg-mul-197.0%
metadata-eval97.0%
metadata-eval97.0%
cancel-sign-sub-inv97.0%
fma-def97.0%
associate-/l*96.9%
metadata-eval96.9%
*-lft-identity96.9%
associate-/l*96.8%
Simplified96.8%
fma-udef96.8%
associate-/l*96.9%
+-commutative96.9%
associate-/l*96.8%
div-inv96.9%
clear-num96.9%
div-inv96.9%
metadata-eval96.9%
Applied egg-rr96.9%
Taylor expanded in a around inf 52.1%
associate-*r*52.1%
*-commutative52.1%
*-commutative52.1%
Simplified52.1%
if -3e8 < b < 6.0000000000000005e-166Initial program 100.0%
Taylor expanded in x around inf 67.9%
if 6.0000000000000005e-166 < b < 6.49999999999999953e188Initial program 99.9%
Taylor expanded in z around inf 57.0%
Final simplification59.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= x -1.8e+60) (* x y) (if (<= x 2.8e-273) c (if (<= x 5.6e-31) (* 0.0625 (* z t)) (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.8e+60) {
tmp = x * y;
} else if (x <= 2.8e-273) {
tmp = c;
} else if (x <= 5.6e-31) {
tmp = 0.0625 * (z * t);
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (x <= (-1.8d+60)) then
tmp = x * y
else if (x <= 2.8d-273) then
tmp = c
else if (x <= 5.6d-31) then
tmp = 0.0625d0 * (z * t)
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.8e+60) {
tmp = x * y;
} else if (x <= 2.8e-273) {
tmp = c;
} else if (x <= 5.6e-31) {
tmp = 0.0625 * (z * t);
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.8e+60: tmp = x * y elif x <= 2.8e-273: tmp = c elif x <= 5.6e-31: tmp = 0.0625 * (z * t) else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.8e+60) tmp = Float64(x * y); elseif (x <= 2.8e-273) tmp = c; elseif (x <= 5.6e-31) tmp = Float64(0.0625 * Float64(z * t)); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (x <= -1.8e+60) tmp = x * y; elseif (x <= 2.8e-273) tmp = c; elseif (x <= 5.6e-31) tmp = 0.0625 * (z * t); else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.8e+60], N[(x * y), $MachinePrecision], If[LessEqual[x, 2.8e-273], c, If[LessEqual[x, 5.6e-31], N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+60}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-273}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-31}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if x < -1.79999999999999984e60 or 5.5999999999999998e-31 < x Initial program 97.3%
associate-+l-97.3%
sub-neg97.3%
neg-mul-197.3%
metadata-eval97.3%
metadata-eval97.3%
cancel-sign-sub-inv97.3%
fma-def97.3%
associate-/l*97.2%
metadata-eval97.2%
*-lft-identity97.2%
associate-/l*97.2%
Simplified97.2%
fma-udef97.2%
associate-/l*97.2%
+-commutative97.2%
associate-/l*97.2%
div-inv97.2%
clear-num97.2%
div-inv97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in x around inf 49.2%
if -1.79999999999999984e60 < x < 2.79999999999999985e-273Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in c around inf 40.0%
if 2.79999999999999985e-273 < x < 5.5999999999999998e-31Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
neg-mul-199.9%
metadata-eval99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
fma-def99.9%
associate-/l*99.8%
metadata-eval99.8%
*-lft-identity99.8%
associate-/l*99.8%
Simplified99.8%
fma-udef99.8%
associate-/l*100.0%
+-commutative100.0%
associate-/l*99.8%
div-inv99.9%
clear-num100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 34.5%
Final simplification42.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= y -5.4e-111) (* x y) (if (<= y 7.2e+78) c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -5.4e-111) {
tmp = x * y;
} else if (y <= 7.2e+78) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (y <= (-5.4d-111)) then
tmp = x * y
else if (y <= 7.2d+78) then
tmp = c
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -5.4e-111) {
tmp = x * y;
} else if (y <= 7.2e+78) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= -5.4e-111: tmp = x * y elif y <= 7.2e+78: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= -5.4e-111) tmp = Float64(x * y); elseif (y <= 7.2e+78) tmp = c; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= -5.4e-111) tmp = x * y; elseif (y <= 7.2e+78) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -5.4e-111], N[(x * y), $MachinePrecision], If[LessEqual[y, 7.2e+78], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{-111}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+78}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -5.39999999999999977e-111 or 7.20000000000000039e78 < y Initial program 97.9%
associate-+l-97.9%
sub-neg97.9%
neg-mul-197.9%
metadata-eval97.9%
metadata-eval97.9%
cancel-sign-sub-inv97.9%
fma-def97.9%
associate-/l*97.8%
metadata-eval97.8%
*-lft-identity97.8%
associate-/l*97.8%
Simplified97.8%
fma-udef97.8%
associate-/l*97.9%
+-commutative97.9%
associate-/l*97.8%
div-inv97.9%
clear-num97.9%
div-inv97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Taylor expanded in x around inf 43.2%
if -5.39999999999999977e-111 < y < 7.20000000000000039e78Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in c around inf 33.7%
Final simplification39.1%
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
def code(x, y, z, t, a, b, c): return c
function code(x, y, z, t, a, b, c) return c end
function tmp = code(x, y, z, t, a, b, c) tmp = c; end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}
\\
c
\end{array}
Initial program 98.8%
associate-+l-98.8%
sub-neg98.8%
neg-mul-198.8%
metadata-eval98.8%
metadata-eval98.8%
cancel-sign-sub-inv98.8%
fma-def98.8%
associate-/l*98.7%
metadata-eval98.7%
*-lft-identity98.7%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in c around inf 24.7%
Final simplification24.7%
herbie shell --seed 2023195
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, C"
:precision binary64
(+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))