
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ x y)) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((z + (x + y)) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (or (<= t_1 -2e+140) (not (<= t_1 5e+154)))
(+ x (+ y t_1))
(+ (* z (- 1.0 (log t))) (+ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -2e+140) || !(t_1 <= 5e+154)) {
tmp = x + (y + t_1);
} else {
tmp = (z * (1.0 - log(t))) + (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (a - 0.5d0) * b
if ((t_1 <= (-2d+140)) .or. (.not. (t_1 <= 5d+154))) then
tmp = x + (y + t_1)
else
tmp = (z * (1.0d0 - log(t))) + (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 t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -2e+140) || !(t_1 <= 5e+154)) {
tmp = x + (y + t_1);
} else {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if (t_1 <= -2e+140) or not (t_1 <= 5e+154): tmp = x + (y + t_1) else: tmp = (z * (1.0 - math.log(t))) + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if ((t_1 <= -2e+140) || !(t_1 <= 5e+154)) tmp = Float64(x + Float64(y + t_1)); else tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if ((t_1 <= -2e+140) || ~((t_1 <= 5e+154))) tmp = x + (y + t_1); else tmp = (z * (1.0 - log(t))) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+140], N[Not[LessEqual[t$95$1, 5e+154]], $MachinePrecision]], N[(x + N[(y + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+140} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+154}\right):\\
\;\;\;\;x + \left(y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.00000000000000012e140 or 5.00000000000000004e154 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
+-commutative99.9%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 92.9%
if -2.00000000000000012e140 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.00000000000000004e154Initial program 99.9%
+-commutative99.9%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 91.1%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (<= t_1 -4e+191)
(+ t_1 (- z (* z (log t))))
(if (<= t_1 5e+154) (+ (* z (- 1.0 (log t))) (+ x y)) (+ x (+ y t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if (t_1 <= -4e+191) {
tmp = t_1 + (z - (z * log(t)));
} else if (t_1 <= 5e+154) {
tmp = (z * (1.0 - log(t))) + (x + y);
} else {
tmp = x + (y + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (a - 0.5d0) * b
if (t_1 <= (-4d+191)) then
tmp = t_1 + (z - (z * log(t)))
else if (t_1 <= 5d+154) then
tmp = (z * (1.0d0 - log(t))) + (x + y)
else
tmp = 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 t_1 = (a - 0.5) * b;
double tmp;
if (t_1 <= -4e+191) {
tmp = t_1 + (z - (z * Math.log(t)));
} else if (t_1 <= 5e+154) {
tmp = (z * (1.0 - Math.log(t))) + (x + y);
} else {
tmp = x + (y + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if t_1 <= -4e+191: tmp = t_1 + (z - (z * math.log(t))) elif t_1 <= 5e+154: tmp = (z * (1.0 - math.log(t))) + (x + y) else: tmp = x + (y + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if (t_1 <= -4e+191) tmp = Float64(t_1 + Float64(z - Float64(z * log(t)))); elseif (t_1 <= 5e+154) tmp = Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y)); else tmp = Float64(x + Float64(y + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if (t_1 <= -4e+191) tmp = t_1 + (z - (z * log(t))); elseif (t_1 <= 5e+154) tmp = (z * (1.0 - log(t))) + (x + y); else tmp = x + (y + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+191], N[(t$95$1 + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+154], N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+191}:\\
\;\;\;\;t\_1 + \left(z - z \cdot \log t\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+154}:\\
\;\;\;\;z \cdot \left(1 - \log t\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + t\_1\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.00000000000000029e191Initial program 100.0%
Taylor expanded in z around inf 99.8%
if -4.00000000000000029e191 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.00000000000000004e154Initial program 99.9%
+-commutative99.9%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 90.7%
if 5.00000000000000004e154 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
+-commutative99.9%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 94.5%
Final simplification92.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- a 0.5) b))) (if (<= (+ x y) -5e-14) (+ x (+ y t_1)) (- (+ y (+ z t_1)) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((x + y) <= -5e-14) {
tmp = x + (y + t_1);
} else {
tmp = (y + (z + t_1)) - (z * log(t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (a - 0.5d0) * b
if ((x + y) <= (-5d-14)) then
tmp = x + (y + t_1)
else
tmp = (y + (z + t_1)) - (z * log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((x + y) <= -5e-14) {
tmp = x + (y + t_1);
} else {
tmp = (y + (z + t_1)) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if (x + y) <= -5e-14: tmp = x + (y + t_1) else: tmp = (y + (z + t_1)) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if (Float64(x + y) <= -5e-14) tmp = Float64(x + Float64(y + t_1)); else tmp = Float64(Float64(y + Float64(z + t_1)) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if ((x + y) <= -5e-14) tmp = x + (y + t_1); else tmp = (y + (z + t_1)) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], -5e-14], N[(x + N[(y + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;x + y \leq -5 \cdot 10^{-14}:\\
\;\;\;\;x + \left(y + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(z + t\_1\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if (+.f64 x y) < -5.0000000000000002e-14Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 86.7%
if -5.0000000000000002e-14 < (+.f64 x y) Initial program 99.9%
Taylor expanded in x around 0 79.1%
Final simplification82.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -8.6e+191)
(+ y t_1)
(if (<= z 2.75e+209) (+ x (+ y (* (- a 0.5) b))) (+ t_1 (* b -0.5))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -8.6e+191) {
tmp = y + t_1;
} else if (z <= 2.75e+209) {
tmp = x + (y + ((a - 0.5) * b));
} else {
tmp = t_1 + (b * -0.5);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = z * (1.0d0 - log(t))
if (z <= (-8.6d+191)) then
tmp = y + t_1
else if (z <= 2.75d+209) then
tmp = x + (y + ((a - 0.5d0) * b))
else
tmp = t_1 + (b * (-0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -8.6e+191) {
tmp = y + t_1;
} else if (z <= 2.75e+209) {
tmp = x + (y + ((a - 0.5) * b));
} else {
tmp = t_1 + (b * -0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -8.6e+191: tmp = y + t_1 elif z <= 2.75e+209: tmp = x + (y + ((a - 0.5) * b)) else: tmp = t_1 + (b * -0.5) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -8.6e+191) tmp = Float64(y + t_1); elseif (z <= 2.75e+209) tmp = Float64(x + Float64(y + Float64(Float64(a - 0.5) * b))); else tmp = Float64(t_1 + Float64(b * -0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -8.6e+191) tmp = y + t_1; elseif (z <= 2.75e+209) tmp = x + (y + ((a - 0.5) * b)); else tmp = t_1 + (b * -0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.6e+191], N[(y + t$95$1), $MachinePrecision], If[LessEqual[z, 2.75e+209], N[(x + N[(y + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{+191}:\\
\;\;\;\;y + t\_1\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+209}:\\
\;\;\;\;x + \left(y + \left(a - 0.5\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + b \cdot -0.5\\
\end{array}
\end{array}
if z < -8.5999999999999995e191Initial program 99.6%
Taylor expanded in x around 0 96.1%
Taylor expanded in b around 0 73.2%
associate--l+73.2%
*-rgt-identity73.2%
unsub-neg73.2%
distribute-rgt-neg-in73.2%
log-rec73.2%
distribute-lft-in73.2%
log-rec73.2%
sub-neg73.2%
Simplified73.2%
if -8.5999999999999995e191 < z < 2.74999999999999984e209Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 88.2%
if 2.74999999999999984e209 < z Initial program 99.8%
Taylor expanded in y around inf 62.0%
associate-/l*62.0%
Simplified62.0%
Taylor expanded in z around inf 65.6%
div-sub65.6%
Simplified65.6%
Taylor expanded in a around 0 87.2%
Final simplification86.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.35e+188) (not (<= z 5.5e+143))) (+ y (* z (- 1.0 (log t)))) (+ x (+ y (* (- a 0.5) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.35e+188) || !(z <= 5.5e+143)) {
tmp = y + (z * (1.0 - log(t)));
} else {
tmp = x + (y + ((a - 0.5) * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-2.35d+188)) .or. (.not. (z <= 5.5d+143))) then
tmp = y + (z * (1.0d0 - log(t)))
else
tmp = x + (y + ((a - 0.5d0) * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.35e+188) || !(z <= 5.5e+143)) {
tmp = y + (z * (1.0 - Math.log(t)));
} else {
tmp = x + (y + ((a - 0.5) * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.35e+188) or not (z <= 5.5e+143): tmp = y + (z * (1.0 - math.log(t))) else: tmp = x + (y + ((a - 0.5) * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.35e+188) || !(z <= 5.5e+143)) tmp = Float64(y + Float64(z * Float64(1.0 - log(t)))); else tmp = Float64(x + Float64(y + Float64(Float64(a - 0.5) * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.35e+188) || ~((z <= 5.5e+143))) tmp = y + (z * (1.0 - log(t))); else tmp = x + (y + ((a - 0.5) * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.35e+188], N[Not[LessEqual[z, 5.5e+143]], $MachinePrecision]], N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+188} \lor \neg \left(z \leq 5.5 \cdot 10^{+143}\right):\\
\;\;\;\;y + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(a - 0.5\right) \cdot b\right)\\
\end{array}
\end{array}
if z < -2.3499999999999999e188 or 5.4999999999999997e143 < z Initial program 99.7%
Taylor expanded in x around 0 93.0%
Taylor expanded in b around 0 67.7%
associate--l+67.7%
*-rgt-identity67.7%
unsub-neg67.7%
distribute-rgt-neg-in67.7%
log-rec67.7%
distribute-lft-in67.7%
log-rec67.7%
sub-neg67.7%
Simplified67.7%
if -2.3499999999999999e188 < z < 5.4999999999999997e143Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 91.6%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.4e+244) (not (<= z 2.4e+209))) (* z (- 1.0 (log t))) (+ x (+ y (* (- a 0.5) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+244) || !(z <= 2.4e+209)) {
tmp = z * (1.0 - log(t));
} else {
tmp = x + (y + ((a - 0.5) * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-5.4d+244)) .or. (.not. (z <= 2.4d+209))) then
tmp = z * (1.0d0 - log(t))
else
tmp = x + (y + ((a - 0.5d0) * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+244) || !(z <= 2.4e+209)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = x + (y + ((a - 0.5) * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e+244) or not (z <= 2.4e+209): tmp = z * (1.0 - math.log(t)) else: tmp = x + (y + ((a - 0.5) * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.4e+244) || !(z <= 2.4e+209)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(x + Float64(y + Float64(Float64(a - 0.5) * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.4e+244) || ~((z <= 2.4e+209))) tmp = z * (1.0 - log(t)); else tmp = x + (y + ((a - 0.5) * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.4e+244], N[Not[LessEqual[z, 2.4e+209]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+244} \lor \neg \left(z \leq 2.4 \cdot 10^{+209}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(a - 0.5\right) \cdot b\right)\\
\end{array}
\end{array}
if z < -5.39999999999999995e244 or 2.39999999999999996e209 < z Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in z around inf 68.1%
if -5.39999999999999995e244 < z < 2.39999999999999996e209Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 86.4%
Final simplification83.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -6.2e+244) (* z (- 1.0 (log t))) (if (<= z 3.05e+209) (+ x (+ y (* (- a 0.5) b))) (- z (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.2e+244) {
tmp = z * (1.0 - log(t));
} else if (z <= 3.05e+209) {
tmp = x + (y + ((a - 0.5) * b));
} else {
tmp = z - (z * log(t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (z <= (-6.2d+244)) then
tmp = z * (1.0d0 - log(t))
else if (z <= 3.05d+209) then
tmp = x + (y + ((a - 0.5d0) * b))
else
tmp = z - (z * log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.2e+244) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 3.05e+209) {
tmp = x + (y + ((a - 0.5) * b));
} else {
tmp = z - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6.2e+244: tmp = z * (1.0 - math.log(t)) elif z <= 3.05e+209: tmp = x + (y + ((a - 0.5) * b)) else: tmp = z - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6.2e+244) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 3.05e+209) tmp = Float64(x + Float64(y + Float64(Float64(a - 0.5) * b))); else tmp = Float64(z - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -6.2e+244) tmp = z * (1.0 - log(t)); elseif (z <= 3.05e+209) tmp = x + (y + ((a - 0.5) * b)); else tmp = z - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.2e+244], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+209], N[(x + N[(y + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+244}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+209}:\\
\;\;\;\;x + \left(y + \left(a - 0.5\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < -6.20000000000000001e244Initial program 99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in z around inf 66.7%
if -6.20000000000000001e244 < z < 3.05000000000000015e209Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 86.4%
if 3.05000000000000015e209 < z Initial program 99.8%
Taylor expanded in x around 0 99.8%
Taylor expanded in z around inf 68.9%
Final simplification83.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (or (<= t_1 -4e+191) (not (<= t_1 5e+167)))
(+ x t_1)
(+ x (+ y (* b -0.5))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -4e+191) || !(t_1 <= 5e+167)) {
tmp = x + t_1;
} else {
tmp = x + (y + (b * -0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (a - 0.5d0) * b
if ((t_1 <= (-4d+191)) .or. (.not. (t_1 <= 5d+167))) then
tmp = x + t_1
else
tmp = x + (y + (b * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -4e+191) || !(t_1 <= 5e+167)) {
tmp = x + t_1;
} else {
tmp = x + (y + (b * -0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if (t_1 <= -4e+191) or not (t_1 <= 5e+167): tmp = x + t_1 else: tmp = x + (y + (b * -0.5)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if ((t_1 <= -4e+191) || !(t_1 <= 5e+167)) tmp = Float64(x + t_1); else tmp = Float64(x + Float64(y + Float64(b * -0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if ((t_1 <= -4e+191) || ~((t_1 <= 5e+167))) tmp = x + t_1; else tmp = x + (y + (b * -0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+191], N[Not[LessEqual[t$95$1, 5e+167]], $MachinePrecision]], N[(x + t$95$1), $MachinePrecision], N[(x + N[(y + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+191} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+167}\right):\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + b \cdot -0.5\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.00000000000000029e191 or 4.9999999999999997e167 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
+-commutative99.9%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 92.5%
Taylor expanded in y around 0 90.3%
if -4.00000000000000029e191 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.9999999999999997e167Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 70.9%
Taylor expanded in a around 0 66.6%
*-commutative66.6%
Simplified66.6%
Final simplification73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (<= b -2.16e+15)
t_1
(if (<= b 2.8e-36) (+ x y) (if (<= b 3e+195) (+ x (* a b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if (b <= -2.16e+15) {
tmp = t_1;
} else if (b <= 2.8e-36) {
tmp = x + y;
} else if (b <= 3e+195) {
tmp = x + (a * b);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (a - 0.5d0) * b
if (b <= (-2.16d+15)) then
tmp = t_1
else if (b <= 2.8d-36) then
tmp = x + y
else if (b <= 3d+195) then
tmp = x + (a * b)
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 t_1 = (a - 0.5) * b;
double tmp;
if (b <= -2.16e+15) {
tmp = t_1;
} else if (b <= 2.8e-36) {
tmp = x + y;
} else if (b <= 3e+195) {
tmp = x + (a * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if b <= -2.16e+15: tmp = t_1 elif b <= 2.8e-36: tmp = x + y elif b <= 3e+195: tmp = x + (a * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if (b <= -2.16e+15) tmp = t_1; elseif (b <= 2.8e-36) tmp = Float64(x + y); elseif (b <= 3e+195) tmp = Float64(x + Float64(a * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if (b <= -2.16e+15) tmp = t_1; elseif (b <= 2.8e-36) tmp = x + y; elseif (b <= 3e+195) tmp = x + (a * b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.16e+15], t$95$1, If[LessEqual[b, 2.8e-36], N[(x + y), $MachinePrecision], If[LessEqual[b, 3e+195], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;b \leq -2.16 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-36}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+195}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.16e15 or 3.0000000000000001e195 < b Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 73.1%
if -2.16e15 < b < 2.8000000000000001e-36Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 71.3%
Taylor expanded in a around inf 69.4%
Taylor expanded in b around inf 44.5%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
if 2.8000000000000001e-36 < b < 3.0000000000000001e195Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 82.7%
Taylor expanded in a around inf 61.0%
*-commutative61.0%
Simplified61.0%
Final simplification66.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.02e+15) (not (<= b 6.2e+100))) (* (- a 0.5) b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.02e+15) || !(b <= 6.2e+100)) {
tmp = (a - 0.5) * b;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((b <= (-2.02d+15)) .or. (.not. (b <= 6.2d+100))) then
tmp = (a - 0.5d0) * b
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 tmp;
if ((b <= -2.02e+15) || !(b <= 6.2e+100)) {
tmp = (a - 0.5) * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.02e+15) or not (b <= 6.2e+100): tmp = (a - 0.5) * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.02e+15) || !(b <= 6.2e+100)) tmp = Float64(Float64(a - 0.5) * b); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.02e+15) || ~((b <= 6.2e+100))) tmp = (a - 0.5) * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.02e+15], N[Not[LessEqual[b, 6.2e+100]], $MachinePrecision]], N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.02 \cdot 10^{+15} \lor \neg \left(b \leq 6.2 \cdot 10^{+100}\right):\\
\;\;\;\;\left(a - 0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -2.02e15 or 6.20000000000000014e100 < b Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 69.4%
if -2.02e15 < b < 6.20000000000000014e100Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 71.9%
Taylor expanded in a around inf 69.0%
Taylor expanded in b around inf 48.2%
Taylor expanded in b around 0 61.7%
+-commutative61.7%
Simplified61.7%
Final simplification64.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.5e+124) (not (<= b 6.2e+100))) (* a b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.5e+124) || !(b <= 6.2e+100)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((b <= (-3.5d+124)) .or. (.not. (b <= 6.2d+100))) then
tmp = a * b
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 tmp;
if ((b <= -3.5e+124) || !(b <= 6.2e+100)) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.5e+124) or not (b <= 6.2e+100): tmp = a * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.5e+124) || !(b <= 6.2e+100)) tmp = Float64(a * b); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.5e+124) || ~((b <= 6.2e+100))) tmp = a * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.5e+124], N[Not[LessEqual[b, 6.2e+100]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+124} \lor \neg \left(b \leq 6.2 \cdot 10^{+100}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -3.5000000000000001e124 or 6.20000000000000014e100 < b Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 54.9%
*-commutative54.9%
Simplified54.9%
if -3.5000000000000001e124 < b < 6.20000000000000014e100Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 70.6%
Taylor expanded in a around inf 67.1%
Taylor expanded in b around inf 48.7%
Taylor expanded in b around 0 57.6%
+-commutative57.6%
Simplified57.6%
Final simplification56.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -5.6e-147) x (if (<= y 7.5e+76) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.6e-147) {
tmp = x;
} else if (y <= 7.5e+76) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (y <= (-5.6d-147)) then
tmp = x
else if (y <= 7.5d+76) then
tmp = a * b
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.6e-147) {
tmp = x;
} else if (y <= 7.5e+76) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.6e-147: tmp = x elif y <= 7.5e+76: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.6e-147) tmp = x; elseif (y <= 7.5e+76) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.6e-147) tmp = x; elseif (y <= 7.5e+76) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.6e-147], x, If[LessEqual[y, 7.5e+76], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{-147}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+76}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -5.6000000000000001e-147Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 22.2%
if -5.6000000000000001e-147 < y < 7.4999999999999995e76Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 30.1%
*-commutative30.1%
Simplified30.1%
if 7.4999999999999995e76 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 55.7%
Final simplification31.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.5e-25) (+ x (* (- a 0.5) b)) (+ x (+ y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.5e-25) {
tmp = x + ((a - 0.5) * b);
} else {
tmp = x + (y + (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (y <= 1.5d-25) then
tmp = x + ((a - 0.5d0) * b)
else
tmp = x + (y + (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.5e-25) {
tmp = x + ((a - 0.5) * b);
} else {
tmp = x + (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.5e-25: tmp = x + ((a - 0.5) * b) else: tmp = x + (y + (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.5e-25) tmp = Float64(x + Float64(Float64(a - 0.5) * b)); else tmp = Float64(x + Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.5e-25) tmp = x + ((a - 0.5) * b); else tmp = x + (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.5e-25], N[(x + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.5 \cdot 10^{-25}:\\
\;\;\;\;x + \left(a - 0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if y < 1.4999999999999999e-25Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 76.7%
Taylor expanded in y around 0 60.6%
if 1.4999999999999999e-25 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.2%
Taylor expanded in a around inf 78.8%
Final simplification65.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y 7.2e+160) (+ x (* (- a 0.5) b)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 7.2e+160) {
tmp = x + ((a - 0.5) * b);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (y <= 7.2d+160) then
tmp = x + ((a - 0.5d0) * b)
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 tmp;
if (y <= 7.2e+160) {
tmp = x + ((a - 0.5) * b);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 7.2e+160: tmp = x + ((a - 0.5) * b) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 7.2e+160) tmp = Float64(x + Float64(Float64(a - 0.5) * b)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 7.2e+160) tmp = x + ((a - 0.5) * b); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 7.2e+160], N[(x + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.2 \cdot 10^{+160}:\\
\;\;\;\;x + \left(a - 0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < 7.20000000000000042e160Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 76.2%
Taylor expanded in y around 0 59.8%
if 7.20000000000000042e160 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 84.8%
Taylor expanded in a around inf 84.8%
Taylor expanded in b around inf 35.3%
Taylor expanded in b around 0 76.4%
+-commutative76.4%
Simplified76.4%
Final simplification62.0%
(FPCore (x y z t a b) :precision binary64 (+ x (+ y (* (- a 0.5) b))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((a - 0.5) * b));
}
real(8) function code(x, y, z, t, a, b)
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
code = x + (y + ((a - 0.5d0) * b))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y + ((a - 0.5) * b));
}
def code(x, y, z, t, a, b): return x + (y + ((a - 0.5) * b))
function code(x, y, z, t, a, b) return Float64(x + Float64(y + Float64(Float64(a - 0.5) * b))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y + ((a - 0.5) * b)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y + \left(a - 0.5\right) \cdot b\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 77.3%
Final simplification77.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.25e+61) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.25e+61) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (y <= 1.25d+61) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.25e+61) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.25e+61: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.25e+61) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.25e+61) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.25e+61], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.25 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.25000000000000004e61Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 25.4%
if 1.25000000000000004e61 < y Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 51.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 23.6%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2024128
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))