
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (+ (* i y) (fma (log y) x (+ (fma (log c) (- b 0.5) a) (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + fma(log(y), x, (fma(log(c), (b - 0.5), a) + (z + t)));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(i * y) + fma(log(y), x, Float64(fma(log(c), Float64(b - 0.5), a) + Float64(z + t)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + a), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y + \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\log c, b - 0.5, a\right) + \left(z + t\right)\right)
\end{array}
Initial program 99.8%
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
lift-+.f64N/A
lift-+.f64N/A
associate-+l+N/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.8
Applied rewrites99.8%
Final simplification99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (+ (+ (* (- b 0.5) (log c)) (+ (+ (+ t_1 z) t) a)) (* i y)))
(t_3 (fma y i t_1)))
(if (<= t_2 -5e+304)
t_3
(if (<= t_2 1e+306) (+ (fma (- b 0.5) (log c) z) a) t_3))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = (((b - 0.5) * log(c)) + (((t_1 + z) + t) + a)) + (i * y);
double t_3 = fma(y, i, t_1);
double tmp;
if (t_2 <= -5e+304) {
tmp = t_3;
} else if (t_2 <= 1e+306) {
tmp = fma((b - 0.5), log(c), z) + a;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(Float64(Float64(t_1 + z) + t) + a)) + Float64(i * y)) t_3 = fma(y, i, t_1) tmp = 0.0 if (t_2 <= -5e+304) tmp = t_3; elseif (t_2 <= 1e+306) tmp = Float64(fma(Float64(b - 0.5), log(c), z) + a); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$1 + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * i + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+304], t$95$3, If[LessEqual[t$95$2, 1e+306], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(\left(b - 0.5\right) \cdot \log c + \left(\left(\left(t\_1 + z\right) + t\right) + a\right)\right) + i \cdot y\\
t_3 := \mathsf{fma}\left(y, i, t\_1\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+304}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 10^{+306}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, z\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -4.9999999999999997e304 or 1.00000000000000002e306 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6497.4
Applied rewrites97.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.4
Applied rewrites97.4%
if -4.9999999999999997e304 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 1.00000000000000002e306Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6487.8
Applied rewrites87.8%
Taylor expanded in t around 0
Applied rewrites69.9%
Taylor expanded in y around 0
Applied rewrites56.7%
Final simplification62.9%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (* b (log c)) (+ a t))) (t_2 (* (- b 0.5) (log c)))) (if (<= t_2 -2e+91) t_1 (if (<= t_2 1e+81) (+ (* i y) (+ a t)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b * log(c)) + (a + t);
double t_2 = (b - 0.5) * log(c);
double tmp;
if (t_2 <= -2e+91) {
tmp = t_1;
} else if (t_2 <= 1e+81) {
tmp = (i * y) + (a + t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * log(c)) + (a + t)
t_2 = (b - 0.5d0) * log(c)
if (t_2 <= (-2d+91)) then
tmp = t_1
else if (t_2 <= 1d+81) then
tmp = (i * y) + (a + 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 i) {
double t_1 = (b * Math.log(c)) + (a + t);
double t_2 = (b - 0.5) * Math.log(c);
double tmp;
if (t_2 <= -2e+91) {
tmp = t_1;
} else if (t_2 <= 1e+81) {
tmp = (i * y) + (a + t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (b * math.log(c)) + (a + t) t_2 = (b - 0.5) * math.log(c) tmp = 0 if t_2 <= -2e+91: tmp = t_1 elif t_2 <= 1e+81: tmp = (i * y) + (a + t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b * log(c)) + Float64(a + t)) t_2 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (t_2 <= -2e+91) tmp = t_1; elseif (t_2 <= 1e+81) tmp = Float64(Float64(i * y) + Float64(a + t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (b * log(c)) + (a + t); t_2 = (b - 0.5) * log(c); tmp = 0.0; if (t_2 <= -2e+91) tmp = t_1; elseif (t_2 <= 1e+81) tmp = (i * y) + (a + t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+91], t$95$1, If[LessEqual[t$95$2, 1e+81], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c + \left(a + t\right)\\
t_2 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+81}:\\
\;\;\;\;i \cdot y + \left(a + t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -2.00000000000000016e91 or 9.99999999999999921e80 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.7%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6486.4
Applied rewrites86.4%
Taylor expanded in b around inf
Applied rewrites68.1%
if -2.00000000000000016e91 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.99999999999999921e80Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6488.8
Applied rewrites88.8%
Taylor expanded in y around inf
Applied rewrites71.0%
Final simplification70.0%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (* b (log c)) a)) (t_2 (* (- b 0.5) (log c)))) (if (<= t_2 -2e+91) t_1 (if (<= t_2 5e+138) (+ (* i y) (+ a t)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b * log(c)) + a;
double t_2 = (b - 0.5) * log(c);
double tmp;
if (t_2 <= -2e+91) {
tmp = t_1;
} else if (t_2 <= 5e+138) {
tmp = (i * y) + (a + t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * log(c)) + a
t_2 = (b - 0.5d0) * log(c)
if (t_2 <= (-2d+91)) then
tmp = t_1
else if (t_2 <= 5d+138) then
tmp = (i * y) + (a + 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 i) {
double t_1 = (b * Math.log(c)) + a;
double t_2 = (b - 0.5) * Math.log(c);
double tmp;
if (t_2 <= -2e+91) {
tmp = t_1;
} else if (t_2 <= 5e+138) {
tmp = (i * y) + (a + t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (b * math.log(c)) + a t_2 = (b - 0.5) * math.log(c) tmp = 0 if t_2 <= -2e+91: tmp = t_1 elif t_2 <= 5e+138: tmp = (i * y) + (a + t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b * log(c)) + a) t_2 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (t_2 <= -2e+91) tmp = t_1; elseif (t_2 <= 5e+138) tmp = Float64(Float64(i * y) + Float64(a + t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (b * log(c)) + a; t_2 = (b - 0.5) * log(c); tmp = 0.0; if (t_2 <= -2e+91) tmp = t_1; elseif (t_2 <= 5e+138) tmp = (i * y) + (a + t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+91], t$95$1, If[LessEqual[t$95$2, 5e+138], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c + a\\
t_2 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+138}:\\
\;\;\;\;i \cdot y + \left(a + t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -2.00000000000000016e91 or 5.00000000000000016e138 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.6%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6487.1
Applied rewrites87.1%
Taylor expanded in t around 0
Applied rewrites77.9%
Taylor expanded in b around inf
Applied rewrites60.9%
if -2.00000000000000016e91 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 5.00000000000000016e138Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6488.3
Applied rewrites88.3%
Taylor expanded in y around inf
Applied rewrites69.9%
Final simplification67.1%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* b (log c))) (t_2 (* (- b 0.5) (log c)))) (if (<= t_2 -1e+151) t_1 (if (<= t_2 1e+150) (+ (* i y) (+ a t)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double t_2 = (b - 0.5) * log(c);
double tmp;
if (t_2 <= -1e+151) {
tmp = t_1;
} else if (t_2 <= 1e+150) {
tmp = (i * y) + (a + t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * log(c)
t_2 = (b - 0.5d0) * log(c)
if (t_2 <= (-1d+151)) then
tmp = t_1
else if (t_2 <= 1d+150) then
tmp = (i * y) + (a + 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 i) {
double t_1 = b * Math.log(c);
double t_2 = (b - 0.5) * Math.log(c);
double tmp;
if (t_2 <= -1e+151) {
tmp = t_1;
} else if (t_2 <= 1e+150) {
tmp = (i * y) + (a + t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) t_2 = (b - 0.5) * math.log(c) tmp = 0 if t_2 <= -1e+151: tmp = t_1 elif t_2 <= 1e+150: tmp = (i * y) + (a + t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) t_2 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (t_2 <= -1e+151) tmp = t_1; elseif (t_2 <= 1e+150) tmp = Float64(Float64(i * y) + Float64(a + t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); t_2 = (b - 0.5) * log(c); tmp = 0.0; if (t_2 <= -1e+151) tmp = t_1; elseif (t_2 <= 1e+150) tmp = (i * y) + (a + t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+151], t$95$1, If[LessEqual[t$95$2, 1e+150], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+150}:\\
\;\;\;\;i \cdot y + \left(a + t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -1.00000000000000002e151 or 9.99999999999999981e149 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-log.f6461.6
Applied rewrites61.6%
if -1.00000000000000002e151 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.99999999999999981e149Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6487.0
Applied rewrites87.0%
Taylor expanded in y around inf
Applied rewrites66.6%
Final simplification65.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -8.5e+211)
(* (+ (/ z x) (log y)) x)
(if (<= x 1.06e+217)
(+ (fma (- b 0.5) (log c) (fma y i z)) (+ a t))
(+ (+ a t) (fma (- b 0.5) (log c) (fma (log y) x z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -8.5e+211) {
tmp = ((z / x) + log(y)) * x;
} else if (x <= 1.06e+217) {
tmp = fma((b - 0.5), log(c), fma(y, i, z)) + (a + t);
} else {
tmp = (a + t) + fma((b - 0.5), log(c), fma(log(y), x, z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -8.5e+211) tmp = Float64(Float64(Float64(z / x) + log(y)) * x); elseif (x <= 1.06e+217) tmp = Float64(fma(Float64(b - 0.5), log(c), fma(y, i, z)) + Float64(a + t)); else tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(log(y), x, z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -8.5e+211], N[(N[(N[(z / x), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 1.06e+217], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+211}:\\
\;\;\;\;\left(\frac{z}{x} + \log y\right) \cdot x\\
\mathbf{elif}\;x \leq 1.06 \cdot 10^{+217}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z\right)\right) + \left(a + t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(\log y, x, z\right)\right)\\
\end{array}
\end{array}
if x < -8.50000000000000091e211Initial program 99.7%
Taylor expanded in x around -inf
*-commutativeN/A
associate-*r*N/A
neg-mul-1N/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
Applied rewrites99.7%
Taylor expanded in z around inf
Applied rewrites74.5%
if -8.50000000000000091e211 < x < 1.06e217Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6496.1
Applied rewrites96.1%
if 1.06e217 < x Initial program 99.5%
Taylor expanded in y around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f6491.2
Applied rewrites91.2%
Final simplification94.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (fma y i (fma (- b 0.5) (log c) (fma (log y) x z))) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b - 0.5), log(c), fma(log(y), x, z))) + a;
}
function code(x, y, z, t, a, b, c, i) return Float64(fma(y, i, fma(Float64(b - 0.5), log(c), fma(log(y), x, z))) + a) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(\log y, x, z\right)\right)\right) + a
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites84.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -8.5e+211)
(* (+ (/ z x) (log y)) x)
(if (<= x 1.6e+226)
(+ (fma (- b 0.5) (log c) (fma y i z)) (+ a t))
(+ (* x (log y)) (+ a t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -8.5e+211) {
tmp = ((z / x) + log(y)) * x;
} else if (x <= 1.6e+226) {
tmp = fma((b - 0.5), log(c), fma(y, i, z)) + (a + t);
} else {
tmp = (x * log(y)) + (a + t);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -8.5e+211) tmp = Float64(Float64(Float64(z / x) + log(y)) * x); elseif (x <= 1.6e+226) tmp = Float64(fma(Float64(b - 0.5), log(c), fma(y, i, z)) + Float64(a + t)); else tmp = Float64(Float64(x * log(y)) + Float64(a + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -8.5e+211], N[(N[(N[(z / x), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 1.6e+226], N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+211}:\\
\;\;\;\;\left(\frac{z}{x} + \log y\right) \cdot x\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+226}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z\right)\right) + \left(a + t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y + \left(a + t\right)\\
\end{array}
\end{array}
if x < -8.50000000000000091e211Initial program 99.7%
Taylor expanded in x around -inf
*-commutativeN/A
associate-*r*N/A
neg-mul-1N/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
Applied rewrites99.7%
Taylor expanded in z around inf
Applied rewrites74.5%
if -8.50000000000000091e211 < x < 1.59999999999999989e226Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6496.1
Applied rewrites96.1%
if 1.59999999999999989e226 < x Initial program 99.4%
Taylor expanded in y around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f6489.9
Applied rewrites89.9%
Taylor expanded in x around inf
Applied rewrites80.1%
Final simplification94.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -8.5e+211)
(* (+ (/ z x) (log y)) x)
(if (<= x 1.6e+226)
(+ (fma (+ -0.5 b) (log c) (fma y i z)) a)
(+ (* x (log y)) (+ a t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -8.5e+211) {
tmp = ((z / x) + log(y)) * x;
} else if (x <= 1.6e+226) {
tmp = fma((-0.5 + b), log(c), fma(y, i, z)) + a;
} else {
tmp = (x * log(y)) + (a + t);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -8.5e+211) tmp = Float64(Float64(Float64(z / x) + log(y)) * x); elseif (x <= 1.6e+226) tmp = Float64(fma(Float64(-0.5 + b), log(c), fma(y, i, z)) + a); else tmp = Float64(Float64(x * log(y)) + Float64(a + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -8.5e+211], N[(N[(N[(z / x), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 1.6e+226], N[(N[(N[(-0.5 + b), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+211}:\\
\;\;\;\;\left(\frac{z}{x} + \log y\right) \cdot x\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+226}:\\
\;\;\;\;\mathsf{fma}\left(-0.5 + b, \log c, \mathsf{fma}\left(y, i, z\right)\right) + a\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y + \left(a + t\right)\\
\end{array}
\end{array}
if x < -8.50000000000000091e211Initial program 99.7%
Taylor expanded in x around -inf
*-commutativeN/A
associate-*r*N/A
neg-mul-1N/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
Applied rewrites99.7%
Taylor expanded in z around inf
Applied rewrites74.5%
if -8.50000000000000091e211 < x < 1.59999999999999989e226Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6496.1
Applied rewrites96.1%
Taylor expanded in t around 0
Applied rewrites79.5%
if 1.59999999999999989e226 < x Initial program 99.4%
Taylor expanded in y around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f6489.9
Applied rewrites89.9%
Taylor expanded in x around inf
Applied rewrites80.1%
Final simplification79.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -2.8e+213)
t_1
(if (<= x 1.6e+226)
(+ (fma (+ -0.5 b) (log c) (fma y i z)) a)
(+ t_1 (+ a t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -2.8e+213) {
tmp = t_1;
} else if (x <= 1.6e+226) {
tmp = fma((-0.5 + b), log(c), fma(y, i, z)) + a;
} else {
tmp = t_1 + (a + t);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -2.8e+213) tmp = t_1; elseif (x <= 1.6e+226) tmp = Float64(fma(Float64(-0.5 + b), log(c), fma(y, i, z)) + a); else tmp = Float64(t_1 + Float64(a + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+213], t$95$1, If[LessEqual[x, 1.6e+226], N[(N[(N[(-0.5 + b), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(t$95$1 + N[(a + t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+226}:\\
\;\;\;\;\mathsf{fma}\left(-0.5 + b, \log c, \mathsf{fma}\left(y, i, z\right)\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(a + t\right)\\
\end{array}
\end{array}
if x < -2.7999999999999999e213Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6474.5
Applied rewrites74.5%
if -2.7999999999999999e213 < x < 1.59999999999999989e226Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6496.1
Applied rewrites96.1%
Taylor expanded in t around 0
Applied rewrites79.5%
if 1.59999999999999989e226 < x Initial program 99.4%
Taylor expanded in y around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f6489.9
Applied rewrites89.9%
Taylor expanded in x around inf
Applied rewrites80.1%
Final simplification79.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.5e+172) (fma (- b 0.5) (log c) (fma y i z)) (+ (* i y) (+ a t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.5e+172) {
tmp = fma((b - 0.5), log(c), fma(y, i, z));
} else {
tmp = (i * y) + (a + t);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4.5e+172) tmp = fma(Float64(b - 0.5), log(c), fma(y, i, z)); else tmp = Float64(Float64(i * y) + Float64(a + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.5e+172], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.5 \cdot 10^{+172}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot y + \left(a + t\right)\\
\end{array}
\end{array}
if a < 4.5000000000000002e172Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6487.6
Applied rewrites87.6%
Taylor expanded in t around 0
Applied rewrites71.1%
Taylor expanded in a around 0
Applied rewrites61.0%
if 4.5000000000000002e172 < a Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6490.9
Applied rewrites90.9%
Taylor expanded in y around inf
Applied rewrites84.9%
Final simplification63.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.4e+154) (fma y i (* b (log c))) (+ (* i y) (+ a t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.4e+154) {
tmp = fma(y, i, (b * log(c)));
} else {
tmp = (i * y) + (a + t);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.4e+154) tmp = fma(y, i, Float64(b * log(c))); else tmp = Float64(Float64(i * y) + Float64(a + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.4e+154], N[(y * i + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.4 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(y, i, b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot y + \left(a + t\right)\\
\end{array}
\end{array}
if a < 2.40000000000000015e154Initial program 99.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6437.2
Applied rewrites37.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6437.2
Applied rewrites37.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-log.f6445.5
Applied rewrites45.5%
if 2.40000000000000015e154 < a Initial program 100.0%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6489.3
Applied rewrites89.3%
Taylor expanded in y around inf
Applied rewrites81.4%
Final simplification50.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.6e+211) (* (/ z x) x) (+ (* i y) (+ a t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.6e+211) {
tmp = (z / x) * x;
} else {
tmp = (i * y) + (a + t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if (z <= (-3.6d+211)) then
tmp = (z / x) * x
else
tmp = (i * y) + (a + t)
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 i) {
double tmp;
if (z <= -3.6e+211) {
tmp = (z / x) * x;
} else {
tmp = (i * y) + (a + t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.6e+211: tmp = (z / x) * x else: tmp = (i * y) + (a + t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.6e+211) tmp = Float64(Float64(z / x) * x); else tmp = Float64(Float64(i * y) + Float64(a + t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -3.6e+211) tmp = (z / x) * x; else tmp = (i * y) + (a + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.6e+211], N[(N[(z / x), $MachinePrecision] * x), $MachinePrecision], N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+211}:\\
\;\;\;\;\frac{z}{x} \cdot x\\
\mathbf{else}:\\
\;\;\;\;i \cdot y + \left(a + t\right)\\
\end{array}
\end{array}
if z < -3.60000000000000003e211Initial program 100.0%
Taylor expanded in x around -inf
*-commutativeN/A
associate-*r*N/A
neg-mul-1N/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
Applied rewrites49.7%
Taylor expanded in z around inf
Applied rewrites34.6%
if -3.60000000000000003e211 < z Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6487.5
Applied rewrites87.5%
Taylor expanded in y around inf
Applied rewrites57.5%
Final simplification56.4%
(FPCore (x y z t a b c i) :precision binary64 (+ (* i y) (+ a t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + (a + t);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = (i * y) + (a + t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + (a + t);
}
def code(x, y, z, t, a, b, c, i): return (i * y) + (a + t)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(i * y) + Float64(a + t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (i * y) + (a + t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y + \left(a + t\right)
\end{array}
Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6487.9
Applied rewrites87.9%
Taylor expanded in y around inf
Applied rewrites55.5%
Final simplification55.5%
(FPCore (x y z t a b c i) :precision binary64 (+ (* i y) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + a;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = (i * y) + a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (i * y) + a;
}
def code(x, y, z, t, a, b, c, i): return (i * y) + a
function code(x, y, z, t, a, b, c, i) return Float64(Float64(i * y) + a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (i * y) + a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y), $MachinePrecision] + a), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y + a
\end{array}
Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6487.9
Applied rewrites87.9%
Taylor expanded in t around 0
Applied rewrites72.8%
Taylor expanded in y around inf
Applied rewrites40.8%
Final simplification40.8%
(FPCore (x y z t a b c i) :precision binary64 (* i y))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return i * y;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = i * y
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return i * y;
}
def code(x, y, z, t, a, b, c, i): return i * y
function code(x, y, z, t, a, b, c, i) return Float64(i * y) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = i * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(i * y), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y
\end{array}
Initial program 99.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f6425.9
Applied rewrites25.9%
Final simplification25.9%
herbie shell --seed 2024249
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
:precision binary64
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))