
(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 12 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 (+ (- (+ (* 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}
Initial program 98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (/ (* a b) -4.0))))
(if (<= (* a b) -4e+97)
t_1
(if (<= (* a b) -1e-182)
(+ c (* 0.0625 (* z t)))
(if (<= (* a b) 5e+145) (+ (* x y) (* z (* t 0.0625))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -4e+97) {
tmp = t_1;
} else if ((a * b) <= -1e-182) {
tmp = c + (0.0625 * (z * t));
} else if ((a * b) <= 5e+145) {
tmp = (x * y) + (z * (t * 0.0625));
} 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 = (x * y) + ((a * b) / (-4.0d0))
if ((a * b) <= (-4d+97)) then
tmp = t_1
else if ((a * b) <= (-1d-182)) then
tmp = c + (0.0625d0 * (z * t))
else if ((a * b) <= 5d+145) then
tmp = (x * y) + (z * (t * 0.0625d0))
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 = (x * y) + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -4e+97) {
tmp = t_1;
} else if ((a * b) <= -1e-182) {
tmp = c + (0.0625 * (z * t));
} else if ((a * b) <= 5e+145) {
tmp = (x * y) + (z * (t * 0.0625));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + ((a * b) / -4.0) tmp = 0 if (a * b) <= -4e+97: tmp = t_1 elif (a * b) <= -1e-182: tmp = c + (0.0625 * (z * t)) elif (a * b) <= 5e+145: tmp = (x * y) + (z * (t * 0.0625)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + Float64(Float64(a * b) / -4.0)) tmp = 0.0 if (Float64(a * b) <= -4e+97) tmp = t_1; elseif (Float64(a * b) <= -1e-182) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); elseif (Float64(a * b) <= 5e+145) tmp = Float64(Float64(x * y) + Float64(z * Float64(t * 0.0625))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + ((a * b) / -4.0); tmp = 0.0; if ((a * b) <= -4e+97) tmp = t_1; elseif ((a * b) <= -1e-182) tmp = c + (0.0625 * (z * t)); elseif ((a * b) <= 5e+145) tmp = (x * y) + (z * (t * 0.0625)); else tmp = 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[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -4e+97], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], -1e-182], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+145], N[(N[(x * y), $MachinePrecision] + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + \frac{a \cdot b}{-4}\\
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-182}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+145}:\\
\;\;\;\;x \cdot y + z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.0000000000000003e97 or 4.99999999999999967e145 < (*.f64 a b) Initial program 97.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.4%
Simplified97.4%
Taylor expanded in x around inf
*-lowering-*.f6489.9%
Simplified89.9%
if -4.0000000000000003e97 < (*.f64 a b) < -1e-182Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6491.5%
Simplified91.5%
Taylor expanded in c around inf
Simplified74.4%
if -1e-182 < (*.f64 a b) < 4.99999999999999967e145Initial program 99.2%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.2%
Simplified99.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.6%
Simplified92.6%
Taylor expanded in c around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6470.6%
Simplified70.6%
Final simplification77.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (+ (* a -0.25) (/ c b)))))
(if (<= (* a b) -2e+72)
t_1
(if (<= (* a b) -1e-182)
(+ c (* 0.0625 (* z t)))
(if (<= (* a b) 5e+145) (+ (* x y) (* z (* t 0.0625))) 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) + (c / b));
double tmp;
if ((a * b) <= -2e+72) {
tmp = t_1;
} else if ((a * b) <= -1e-182) {
tmp = c + (0.0625 * (z * t));
} else if ((a * b) <= 5e+145) {
tmp = (x * y) + (z * (t * 0.0625));
} 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 * ((a * (-0.25d0)) + (c / b))
if ((a * b) <= (-2d+72)) then
tmp = t_1
else if ((a * b) <= (-1d-182)) then
tmp = c + (0.0625d0 * (z * t))
else if ((a * b) <= 5d+145) then
tmp = (x * y) + (z * (t * 0.0625d0))
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 * ((a * -0.25) + (c / b));
double tmp;
if ((a * b) <= -2e+72) {
tmp = t_1;
} else if ((a * b) <= -1e-182) {
tmp = c + (0.0625 * (z * t));
} else if ((a * b) <= 5e+145) {
tmp = (x * y) + (z * (t * 0.0625));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * ((a * -0.25) + (c / b)) tmp = 0 if (a * b) <= -2e+72: tmp = t_1 elif (a * b) <= -1e-182: tmp = c + (0.0625 * (z * t)) elif (a * b) <= 5e+145: tmp = (x * y) + (z * (t * 0.0625)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(Float64(a * -0.25) + Float64(c / b))) tmp = 0.0 if (Float64(a * b) <= -2e+72) tmp = t_1; elseif (Float64(a * b) <= -1e-182) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); elseif (Float64(a * b) <= 5e+145) tmp = Float64(Float64(x * y) + Float64(z * Float64(t * 0.0625))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b * ((a * -0.25) + (c / b)); tmp = 0.0; if ((a * b) <= -2e+72) tmp = t_1; elseif ((a * b) <= -1e-182) tmp = c + (0.0625 * (z * t)); elseif ((a * b) <= 5e+145) tmp = (x * y) + (z * (t * 0.0625)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(N[(a * -0.25), $MachinePrecision] + N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+72], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], -1e-182], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+145], N[(N[(x * y), $MachinePrecision] + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot -0.25 + \frac{c}{b}\right)\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-182}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+145}:\\
\;\;\;\;x \cdot y + z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.99999999999999989e72 or 4.99999999999999967e145 < (*.f64 a b) Initial program 97.5%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.5%
Simplified97.5%
Taylor expanded in c around inf
Simplified83.5%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6484.7%
Simplified84.7%
if -1.99999999999999989e72 < (*.f64 a b) < -1e-182Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6493.0%
Simplified93.0%
Taylor expanded in c around inf
Simplified74.5%
if -1e-182 < (*.f64 a b) < 4.99999999999999967e145Initial program 99.2%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.2%
Simplified99.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.6%
Simplified92.6%
Taylor expanded in c around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6470.6%
Simplified70.6%
Final simplification75.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) -0.25)))
(if (<= (* a b) -1.22e+88)
t_1
(if (<= (* a b) -3.9e-200) c (if (<= (* a b) 5.6e+100) (* x y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -1.22e+88) {
tmp = t_1;
} else if ((a * b) <= -3.9e-200) {
tmp = c;
} else if ((a * b) <= 5.6e+100) {
tmp = x * y;
} 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 = (a * b) * (-0.25d0)
if ((a * b) <= (-1.22d+88)) then
tmp = t_1
else if ((a * b) <= (-3.9d-200)) then
tmp = c
else if ((a * b) <= 5.6d+100) then
tmp = x * y
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 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -1.22e+88) {
tmp = t_1;
} else if ((a * b) <= -3.9e-200) {
tmp = c;
} else if ((a * b) <= 5.6e+100) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * -0.25 tmp = 0 if (a * b) <= -1.22e+88: tmp = t_1 elif (a * b) <= -3.9e-200: tmp = c elif (a * b) <= 5.6e+100: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * -0.25) tmp = 0.0 if (Float64(a * b) <= -1.22e+88) tmp = t_1; elseif (Float64(a * b) <= -3.9e-200) tmp = c; elseif (Float64(a * b) <= 5.6e+100) tmp = Float64(x * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * -0.25; tmp = 0.0; if ((a * b) <= -1.22e+88) tmp = t_1; elseif ((a * b) <= -3.9e-200) tmp = c; elseif ((a * b) <= 5.6e+100) tmp = x * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.22e+88], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], -3.9e-200], c, If[LessEqual[N[(a * b), $MachinePrecision], 5.6e+100], N[(x * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot -0.25\\
\mathbf{if}\;a \cdot b \leq -1.22 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq -3.9 \cdot 10^{-200}:\\
\;\;\;\;c\\
\mathbf{elif}\;a \cdot b \leq 5.6 \cdot 10^{+100}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.22e88 or 5.5999999999999996e100 < (*.f64 a b) Initial program 97.7%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.7%
Simplified97.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6469.5%
Simplified69.5%
if -1.22e88 < (*.f64 a b) < -3.89999999999999999e-200Initial program 100.0%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in c around inf
Simplified38.2%
if -3.89999999999999999e-200 < (*.f64 a b) < 5.5999999999999996e100Initial program 99.1%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.1%
Simplified99.1%
Taylor expanded in x around inf
*-lowering-*.f6435.4%
Simplified35.4%
Final simplification47.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* x y) (/ (* a b) -4.0))))
(if (<= (* a b) -4e+97)
t_1
(if (<= (* a b) 5e+145) (+ (* 0.0625 (* z t)) (+ (* x y) c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -4e+97) {
tmp = t_1;
} else if ((a * b) <= 5e+145) {
tmp = (0.0625 * (z * t)) + ((x * y) + c);
} 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 = (x * y) + ((a * b) / (-4.0d0))
if ((a * b) <= (-4d+97)) then
tmp = t_1
else if ((a * b) <= 5d+145) then
tmp = (0.0625d0 * (z * t)) + ((x * y) + c)
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 = (x * y) + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -4e+97) {
tmp = t_1;
} else if ((a * b) <= 5e+145) {
tmp = (0.0625 * (z * t)) + ((x * y) + c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) + ((a * b) / -4.0) tmp = 0 if (a * b) <= -4e+97: tmp = t_1 elif (a * b) <= 5e+145: tmp = (0.0625 * (z * t)) + ((x * y) + c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) + Float64(Float64(a * b) / -4.0)) tmp = 0.0 if (Float64(a * b) <= -4e+97) tmp = t_1; elseif (Float64(a * b) <= 5e+145) tmp = Float64(Float64(0.0625 * Float64(z * t)) + Float64(Float64(x * y) + c)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) + ((a * b) / -4.0); tmp = 0.0; if ((a * b) <= -4e+97) tmp = t_1; elseif ((a * b) <= 5e+145) tmp = (0.0625 * (z * t)) + ((x * y) + c); else tmp = 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[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -4e+97], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 5e+145], N[(N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + \frac{a \cdot b}{-4}\\
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+145}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right) + \left(x \cdot y + c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.0000000000000003e97 or 4.99999999999999967e145 < (*.f64 a b) Initial program 97.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.4%
Simplified97.4%
Taylor expanded in x around inf
*-lowering-*.f6489.9%
Simplified89.9%
if -4.0000000000000003e97 < (*.f64 a b) < 4.99999999999999967e145Initial program 99.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.4%
Simplified92.4%
Final simplification91.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (+ (* a -0.25) (/ c b)))))
(if (<= (* a b) -2e+72)
t_1
(if (<= (* a b) 5e+145) (+ 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 * ((a * -0.25) + (c / b));
double tmp;
if ((a * b) <= -2e+72) {
tmp = t_1;
} else if ((a * b) <= 5e+145) {
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 * ((a * (-0.25d0)) + (c / b))
if ((a * b) <= (-2d+72)) then
tmp = t_1
else if ((a * b) <= 5d+145) 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 * ((a * -0.25) + (c / b));
double tmp;
if ((a * b) <= -2e+72) {
tmp = t_1;
} else if ((a * b) <= 5e+145) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * ((a * -0.25) + (c / b)) tmp = 0 if (a * b) <= -2e+72: tmp = t_1 elif (a * b) <= 5e+145: 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(Float64(a * -0.25) + Float64(c / b))) tmp = 0.0 if (Float64(a * b) <= -2e+72) tmp = t_1; elseif (Float64(a * b) <= 5e+145) 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 * ((a * -0.25) + (c / b)); tmp = 0.0; if ((a * b) <= -2e+72) tmp = t_1; elseif ((a * b) <= 5e+145) 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[(N[(a * -0.25), $MachinePrecision] + N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+72], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 5e+145], 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(a \cdot -0.25 + \frac{c}{b}\right)\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+145}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.99999999999999989e72 or 4.99999999999999967e145 < (*.f64 a b) Initial program 97.5%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.5%
Simplified97.5%
Taylor expanded in c around inf
Simplified83.5%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6484.7%
Simplified84.7%
if -1.99999999999999989e72 < (*.f64 a b) < 4.99999999999999967e145Initial program 99.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.7%
Simplified92.7%
Taylor expanded in c around inf
Simplified64.9%
Final simplification71.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (/ (* a b) -4.0))))
(if (<= (* a b) -4.3e+45)
t_1
(if (<= (* a b) 3.8e+145) (+ 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 = c + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -4.3e+45) {
tmp = t_1;
} else if ((a * b) <= 3.8e+145) {
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 = c + ((a * b) / (-4.0d0))
if ((a * b) <= (-4.3d+45)) then
tmp = t_1
else if ((a * b) <= 3.8d+145) 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 = c + ((a * b) / -4.0);
double tmp;
if ((a * b) <= -4.3e+45) {
tmp = t_1;
} else if ((a * b) <= 3.8e+145) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + ((a * b) / -4.0) tmp = 0 if (a * b) <= -4.3e+45: tmp = t_1 elif (a * b) <= 3.8e+145: tmp = c + (0.0625 * (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(Float64(a * b) / -4.0)) tmp = 0.0 if (Float64(a * b) <= -4.3e+45) tmp = t_1; elseif (Float64(a * b) <= 3.8e+145) 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 = c + ((a * b) / -4.0); tmp = 0.0; if ((a * b) <= -4.3e+45) tmp = t_1; elseif ((a * b) <= 3.8e+145) 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[(c + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -4.3e+45], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 3.8e+145], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + \frac{a \cdot b}{-4}\\
\mathbf{if}\;a \cdot b \leq -4.3 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 3.8 \cdot 10^{+145}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.3000000000000003e45 or 3.80000000000000012e145 < (*.f64 a b) Initial program 97.7%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.7%
Simplified97.7%
Taylor expanded in c around inf
Simplified82.4%
if -4.3000000000000003e45 < (*.f64 a b) < 3.80000000000000012e145Initial program 99.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6493.1%
Simplified93.1%
Taylor expanded in c around inf
Simplified64.8%
Final simplification70.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) -0.25)))
(if (<= (* a b) -8.1e+96)
t_1
(if (<= (* a b) 1.1e+157) (+ 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 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -8.1e+96) {
tmp = t_1;
} else if ((a * b) <= 1.1e+157) {
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 = (a * b) * (-0.25d0)
if ((a * b) <= (-8.1d+96)) then
tmp = t_1
else if ((a * b) <= 1.1d+157) 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 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -8.1e+96) {
tmp = t_1;
} else if ((a * b) <= 1.1e+157) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * -0.25 tmp = 0 if (a * b) <= -8.1e+96: tmp = t_1 elif (a * b) <= 1.1e+157: tmp = c + (0.0625 * (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * -0.25) tmp = 0.0 if (Float64(a * b) <= -8.1e+96) tmp = t_1; elseif (Float64(a * b) <= 1.1e+157) 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 = (a * b) * -0.25; tmp = 0.0; if ((a * b) <= -8.1e+96) tmp = t_1; elseif ((a * b) <= 1.1e+157) 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[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -8.1e+96], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 1.1e+157], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot -0.25\\
\mathbf{if}\;a \cdot b \leq -8.1 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 1.1 \cdot 10^{+157}:\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -8.1000000000000002e96 or 1.1000000000000001e157 < (*.f64 a b) Initial program 97.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.4%
Simplified97.4%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6476.4%
Simplified76.4%
if -8.1000000000000002e96 < (*.f64 a b) < 1.1000000000000001e157Initial program 99.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.4%
Simplified92.4%
Taylor expanded in c around inf
Simplified65.1%
Final simplification68.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) -0.25)))
(if (<= (* a b) -5.8e+228)
t_1
(if (<= (* a b) 1.75e+139) (+ (* x y) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -5.8e+228) {
tmp = t_1;
} else if ((a * b) <= 1.75e+139) {
tmp = (x * y) + c;
} 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 = (a * b) * (-0.25d0)
if ((a * b) <= (-5.8d+228)) then
tmp = t_1
else if ((a * b) <= 1.75d+139) then
tmp = (x * y) + c
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 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -5.8e+228) {
tmp = t_1;
} else if ((a * b) <= 1.75e+139) {
tmp = (x * y) + c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * -0.25 tmp = 0 if (a * b) <= -5.8e+228: tmp = t_1 elif (a * b) <= 1.75e+139: tmp = (x * y) + c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * -0.25) tmp = 0.0 if (Float64(a * b) <= -5.8e+228) tmp = t_1; elseif (Float64(a * b) <= 1.75e+139) tmp = Float64(Float64(x * y) + c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * -0.25; tmp = 0.0; if ((a * b) <= -5.8e+228) tmp = t_1; elseif ((a * b) <= 1.75e+139) tmp = (x * y) + c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -5.8e+228], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 1.75e+139], N[(N[(x * y), $MachinePrecision] + c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot -0.25\\
\mathbf{if}\;a \cdot b \leq -5.8 \cdot 10^{+228}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 1.75 \cdot 10^{+139}:\\
\;\;\;\;x \cdot y + c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -5.80000000000000003e228 or 1.74999999999999989e139 < (*.f64 a b) Initial program 96.7%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6496.7%
Simplified96.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6482.6%
Simplified82.6%
if -5.80000000000000003e228 < (*.f64 a b) < 1.74999999999999989e139Initial program 99.5%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.5%
Simplified99.5%
Taylor expanded in a around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6488.7%
Simplified88.7%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f6455.4%
Simplified55.4%
Final simplification61.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) -0.25)))
(if (<= (* a b) -1.15e+52)
t_1
(if (<= (* a b) 2.65e+150) (* 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 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -1.15e+52) {
tmp = t_1;
} else if ((a * b) <= 2.65e+150) {
tmp = 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 = (a * b) * (-0.25d0)
if ((a * b) <= (-1.15d+52)) then
tmp = t_1
else if ((a * b) <= 2.65d+150) then
tmp = 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 = (a * b) * -0.25;
double tmp;
if ((a * b) <= -1.15e+52) {
tmp = t_1;
} else if ((a * b) <= 2.65e+150) {
tmp = 0.0625 * (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * -0.25 tmp = 0 if (a * b) <= -1.15e+52: tmp = t_1 elif (a * b) <= 2.65e+150: tmp = 0.0625 * (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * -0.25) tmp = 0.0 if (Float64(a * b) <= -1.15e+52) tmp = t_1; elseif (Float64(a * b) <= 2.65e+150) tmp = 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 = (a * b) * -0.25; tmp = 0.0; if ((a * b) <= -1.15e+52) tmp = t_1; elseif ((a * b) <= 2.65e+150) tmp = 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[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.15e+52], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 2.65e+150], N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot -0.25\\
\mathbf{if}\;a \cdot b \leq -1.15 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 2.65 \cdot 10^{+150}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.15e52 or 2.65000000000000007e150 < (*.f64 a b) Initial program 97.7%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.7%
Simplified97.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6470.2%
Simplified70.2%
if -1.15e52 < (*.f64 a b) < 2.65000000000000007e150Initial program 99.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f6440.6%
Simplified40.6%
Final simplification50.7%
(FPCore (x y z t a b c) :precision binary64 (if (<= (* x y) -1.1e+74) (* x y) (if (<= (* x y) 4.4e+133) c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -1.1e+74) {
tmp = x * y;
} else if ((x * y) <= 4.4e+133) {
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 ((x * y) <= (-1.1d+74)) then
tmp = x * y
else if ((x * y) <= 4.4d+133) 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 ((x * y) <= -1.1e+74) {
tmp = x * y;
} else if ((x * y) <= 4.4e+133) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -1.1e+74: tmp = x * y elif (x * y) <= 4.4e+133: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(x * y) <= -1.1e+74) tmp = Float64(x * y); elseif (Float64(x * y) <= 4.4e+133) 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 ((x * y) <= -1.1e+74) tmp = x * y; elseif ((x * y) <= 4.4e+133) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(x * y), $MachinePrecision], -1.1e+74], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4.4e+133], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.1 \cdot 10^{+74}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 4.4 \cdot 10^{+133}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -1.1000000000000001e74 or 4.4e133 < (*.f64 x y) Initial program 97.9%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6497.9%
Simplified97.9%
Taylor expanded in x around inf
*-lowering-*.f6461.8%
Simplified61.8%
if -1.1000000000000001e74 < (*.f64 x y) < 4.4e133Initial program 99.4%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6499.4%
Simplified99.4%
Taylor expanded in c around inf
Simplified28.8%
(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%
+-commutativeN/A
sub-negN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6498.8%
Simplified98.8%
Taylor expanded in c around inf
Simplified22.1%
herbie shell --seed 2024152
(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))