
(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 (+ (+ (+ (+ t (+ (* x (log y)) z)) 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 (((t + ((x * log(y)) + z)) + 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 = (((t + ((x * log(y)) + z)) + 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 (((t + ((x * Math.log(y)) + z)) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((t + ((x * math.log(y)) + z)) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(t + Float64(Float64(x * log(y)) + z)) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((t + ((x * log(y)) + z)) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $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(t + \left(x \cdot \log y + z\right)\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 2.4e+14) (+ (* x (log y)) (+ (+ a (+ z t)) (* (log c) (+ b -0.5)))) (+ (* y i) (+ (* (- b 0.5) (log c)) (+ z a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.4e+14) {
tmp = (x * log(y)) + ((a + (z + t)) + (log(c) * (b + -0.5)));
} else {
tmp = (y * i) + (((b - 0.5) * log(c)) + (z + a));
}
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 (y <= 2.4d+14) then
tmp = (x * log(y)) + ((a + (z + t)) + (log(c) * (b + (-0.5d0))))
else
tmp = (y * i) + (((b - 0.5d0) * log(c)) + (z + a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.4e+14) {
tmp = (x * Math.log(y)) + ((a + (z + t)) + (Math.log(c) * (b + -0.5)));
} else {
tmp = (y * i) + (((b - 0.5) * Math.log(c)) + (z + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 2.4e+14: tmp = (x * math.log(y)) + ((a + (z + t)) + (math.log(c) * (b + -0.5))) else: tmp = (y * i) + (((b - 0.5) * math.log(c)) + (z + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 2.4e+14) tmp = Float64(Float64(x * log(y)) + Float64(Float64(a + Float64(z + t)) + Float64(log(c) * Float64(b + -0.5)))); else tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(z + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 2.4e+14) tmp = (x * log(y)) + ((a + (z + t)) + (log(c) * (b + -0.5))); else tmp = (y * i) + (((b - 0.5) * log(c)) + (z + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2.4e+14], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.4 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \log y + \left(\left(a + \left(z + t\right)\right) + \log c \cdot \left(b + -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(z + a\right)\right)\\
\end{array}
\end{array}
if y < 2.4e14Initial program 99.9%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified97.6%
if 2.4e14 < y Initial program 99.9%
Taylor expanded in z around inf
Simplified80.8%
Final simplification90.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (* (- b 0.5) (log c))))
(if (<= x -7.8e+180)
(+ (* y i) (+ t_1 t_2))
(if (<= x 5.8e+204) (+ (* y i) (+ t_2 (+ z a))) (+ t_1 (* y i))))))
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);
double tmp;
if (x <= -7.8e+180) {
tmp = (y * i) + (t_1 + t_2);
} else if (x <= 5.8e+204) {
tmp = (y * i) + (t_2 + (z + a));
} else {
tmp = t_1 + (y * i);
}
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 = x * log(y)
t_2 = (b - 0.5d0) * log(c)
if (x <= (-7.8d+180)) then
tmp = (y * i) + (t_1 + t_2)
else if (x <= 5.8d+204) then
tmp = (y * i) + (t_2 + (z + a))
else
tmp = t_1 + (y * i)
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 = x * Math.log(y);
double t_2 = (b - 0.5) * Math.log(c);
double tmp;
if (x <= -7.8e+180) {
tmp = (y * i) + (t_1 + t_2);
} else if (x <= 5.8e+204) {
tmp = (y * i) + (t_2 + (z + a));
} else {
tmp = t_1 + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = (b - 0.5) * math.log(c) tmp = 0 if x <= -7.8e+180: tmp = (y * i) + (t_1 + t_2) elif x <= 5.8e+204: tmp = (y * i) + (t_2 + (z + a)) else: tmp = t_1 + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (x <= -7.8e+180) tmp = Float64(Float64(y * i) + Float64(t_1 + t_2)); elseif (x <= 5.8e+204) tmp = Float64(Float64(y * i) + Float64(t_2 + Float64(z + a))); else tmp = Float64(t_1 + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = (b - 0.5) * log(c); tmp = 0.0; if (x <= -7.8e+180) tmp = (y * i) + (t_1 + t_2); elseif (x <= 5.8e+204) tmp = (y * i) + (t_2 + (z + a)); else tmp = t_1 + (y * i); end tmp_2 = 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[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.8e+180], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+204], N[(N[(y * i), $MachinePrecision] + N[(t$95$2 + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+180}:\\
\;\;\;\;y \cdot i + \left(t\_1 + t\_2\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+204}:\\
\;\;\;\;y \cdot i + \left(t\_2 + \left(z + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + y \cdot i\\
\end{array}
\end{array}
if x < -7.8000000000000002e180Initial program 100.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6480.2%
Simplified80.2%
if -7.8000000000000002e180 < x < 5.80000000000000007e204Initial program 99.9%
Taylor expanded in z around inf
Simplified73.4%
if 5.80000000000000007e204 < x Initial program 99.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6492.9%
Simplified92.9%
Final simplification76.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c))))
(if (<= z -3.2e+216)
(+ (* y i) (+ z t_1))
(if (<= z -4.7e+103)
(+ a (+ (+ z t) (* (log c) (+ b -0.5))))
(if (<= z -9e+69) (+ (* x (log y)) z) (+ (* y i) (+ t_1 (+ t a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * log(c);
double tmp;
if (z <= -3.2e+216) {
tmp = (y * i) + (z + t_1);
} else if (z <= -4.7e+103) {
tmp = a + ((z + t) + (log(c) * (b + -0.5)));
} else if (z <= -9e+69) {
tmp = (x * log(y)) + z;
} else {
tmp = (y * i) + (t_1 + (t + a));
}
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) :: tmp
t_1 = (b - 0.5d0) * log(c)
if (z <= (-3.2d+216)) then
tmp = (y * i) + (z + t_1)
else if (z <= (-4.7d+103)) then
tmp = a + ((z + t) + (log(c) * (b + (-0.5d0))))
else if (z <= (-9d+69)) then
tmp = (x * log(y)) + z
else
tmp = (y * i) + (t_1 + (t + a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * Math.log(c);
double tmp;
if (z <= -3.2e+216) {
tmp = (y * i) + (z + t_1);
} else if (z <= -4.7e+103) {
tmp = a + ((z + t) + (Math.log(c) * (b + -0.5)));
} else if (z <= -9e+69) {
tmp = (x * Math.log(y)) + z;
} else {
tmp = (y * i) + (t_1 + (t + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (b - 0.5) * math.log(c) tmp = 0 if z <= -3.2e+216: tmp = (y * i) + (z + t_1) elif z <= -4.7e+103: tmp = a + ((z + t) + (math.log(c) * (b + -0.5))) elif z <= -9e+69: tmp = (x * math.log(y)) + z else: tmp = (y * i) + (t_1 + (t + a)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (z <= -3.2e+216) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (z <= -4.7e+103) tmp = Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5)))); elseif (z <= -9e+69) tmp = Float64(Float64(x * log(y)) + z); else tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(t + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (b - 0.5) * log(c); tmp = 0.0; if (z <= -3.2e+216) tmp = (y * i) + (z + t_1); elseif (z <= -4.7e+103) tmp = a + ((z + t) + (log(c) * (b + -0.5))); elseif (z <= -9e+69) tmp = (x * log(y)) + z; else tmp = (y * i) + (t_1 + (t + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+216], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.7e+103], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e+69], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+216}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{+103}:\\
\;\;\;\;a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\\
\mathbf{elif}\;z \leq -9 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \log y + z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(t + a\right)\right)\\
\end{array}
\end{array}
if z < -3.1999999999999997e216Initial program 99.9%
Taylor expanded in z around inf
Simplified84.3%
if -3.1999999999999997e216 < z < -4.70000000000000033e103Initial program 99.9%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified95.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3%
Simplified91.3%
if -4.70000000000000033e103 < z < -8.9999999999999999e69Initial program 100.0%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified100.0%
Taylor expanded in z around inf
Simplified35.1%
if -8.9999999999999999e69 < z Initial program 99.9%
Taylor expanded in t around inf
Simplified72.3%
Final simplification73.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c))))
(if (<= z -8.5e+215)
(+ (* y i) (+ z t_1))
(if (<= z -4.7e+103)
(+ a (+ (+ z t) (* (log c) (+ b -0.5))))
(if (<= z -9e+69) (+ (* x (log y)) z) (+ (* y i) (+ a t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * log(c);
double tmp;
if (z <= -8.5e+215) {
tmp = (y * i) + (z + t_1);
} else if (z <= -4.7e+103) {
tmp = a + ((z + t) + (log(c) * (b + -0.5)));
} else if (z <= -9e+69) {
tmp = (x * log(y)) + z;
} else {
tmp = (y * i) + (a + 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) :: tmp
t_1 = (b - 0.5d0) * log(c)
if (z <= (-8.5d+215)) then
tmp = (y * i) + (z + t_1)
else if (z <= (-4.7d+103)) then
tmp = a + ((z + t) + (log(c) * (b + (-0.5d0))))
else if (z <= (-9d+69)) then
tmp = (x * log(y)) + z
else
tmp = (y * i) + (a + 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 - 0.5) * Math.log(c);
double tmp;
if (z <= -8.5e+215) {
tmp = (y * i) + (z + t_1);
} else if (z <= -4.7e+103) {
tmp = a + ((z + t) + (Math.log(c) * (b + -0.5)));
} else if (z <= -9e+69) {
tmp = (x * Math.log(y)) + z;
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (b - 0.5) * math.log(c) tmp = 0 if z <= -8.5e+215: tmp = (y * i) + (z + t_1) elif z <= -4.7e+103: tmp = a + ((z + t) + (math.log(c) * (b + -0.5))) elif z <= -9e+69: tmp = (x * math.log(y)) + z else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (z <= -8.5e+215) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (z <= -4.7e+103) tmp = Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5)))); elseif (z <= -9e+69) tmp = Float64(Float64(x * log(y)) + z); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (b - 0.5) * log(c); tmp = 0.0; if (z <= -8.5e+215) tmp = (y * i) + (z + t_1); elseif (z <= -4.7e+103) tmp = a + ((z + t) + (log(c) * (b + -0.5))); elseif (z <= -9e+69) tmp = (x * log(y)) + z; else tmp = (y * i) + (a + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+215], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.7e+103], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e+69], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+215}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{+103}:\\
\;\;\;\;a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\\
\mathbf{elif}\;z \leq -9 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \log y + z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if z < -8.50000000000000064e215Initial program 99.9%
Taylor expanded in z around inf
Simplified84.3%
if -8.50000000000000064e215 < z < -4.70000000000000033e103Initial program 99.9%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified95.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3%
Simplified91.3%
if -4.70000000000000033e103 < z < -8.9999999999999999e69Initial program 100.0%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified100.0%
Taylor expanded in z around inf
Simplified35.1%
if -8.9999999999999999e69 < z Initial program 99.9%
Taylor expanded in a around inf
Simplified54.0%
Final simplification58.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -1.85e+219)
(+ z (* y i))
(if (<= z -5.7e+103)
(+ a (+ (+ z t) (* (log c) (+ b -0.5))))
(if (<= z -9e+69)
(+ (* x (log y)) z)
(+ (* y i) (+ a (* (- b 0.5) (log c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.85e+219) {
tmp = z + (y * i);
} else if (z <= -5.7e+103) {
tmp = a + ((z + t) + (log(c) * (b + -0.5)));
} else if (z <= -9e+69) {
tmp = (x * log(y)) + z;
} else {
tmp = (y * i) + (a + ((b - 0.5) * log(c)));
}
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 <= (-1.85d+219)) then
tmp = z + (y * i)
else if (z <= (-5.7d+103)) then
tmp = a + ((z + t) + (log(c) * (b + (-0.5d0))))
else if (z <= (-9d+69)) then
tmp = (x * log(y)) + z
else
tmp = (y * i) + (a + ((b - 0.5d0) * log(c)))
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 <= -1.85e+219) {
tmp = z + (y * i);
} else if (z <= -5.7e+103) {
tmp = a + ((z + t) + (Math.log(c) * (b + -0.5)));
} else if (z <= -9e+69) {
tmp = (x * Math.log(y)) + z;
} else {
tmp = (y * i) + (a + ((b - 0.5) * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.85e+219: tmp = z + (y * i) elif z <= -5.7e+103: tmp = a + ((z + t) + (math.log(c) * (b + -0.5))) elif z <= -9e+69: tmp = (x * math.log(y)) + z else: tmp = (y * i) + (a + ((b - 0.5) * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.85e+219) tmp = Float64(z + Float64(y * i)); elseif (z <= -5.7e+103) tmp = Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5)))); elseif (z <= -9e+69) tmp = Float64(Float64(x * log(y)) + z); else tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(b - 0.5) * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.85e+219) tmp = z + (y * i); elseif (z <= -5.7e+103) tmp = a + ((z + t) + (log(c) * (b + -0.5))); elseif (z <= -9e+69) tmp = (x * log(y)) + z; else tmp = (y * i) + (a + ((b - 0.5) * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.85e+219], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.7e+103], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e+69], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+219}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{+103}:\\
\;\;\;\;a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\\
\mathbf{elif}\;z \leq -9 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \log y + z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if z < -1.85e219Initial program 99.9%
Taylor expanded in z around inf
Simplified78.7%
if -1.85e219 < z < -5.70000000000000033e103Initial program 99.9%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified95.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.3%
Simplified91.3%
if -5.70000000000000033e103 < z < -8.9999999999999999e69Initial program 100.0%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified100.0%
Taylor expanded in z around inf
Simplified35.1%
if -8.9999999999999999e69 < z Initial program 99.9%
Taylor expanded in a around inf
Simplified54.0%
Final simplification58.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x (log y)) (* y i))))
(if (<= x -8.6e+177)
t_1
(if (<= x 3.7e+205) (+ (* y i) (+ (* (- b 0.5) (log c)) (+ z a))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * log(y)) + (y * i);
double tmp;
if (x <= -8.6e+177) {
tmp = t_1;
} else if (x <= 3.7e+205) {
tmp = (y * i) + (((b - 0.5) * log(c)) + (z + a));
} 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) :: tmp
t_1 = (x * log(y)) + (y * i)
if (x <= (-8.6d+177)) then
tmp = t_1
else if (x <= 3.7d+205) then
tmp = (y * i) + (((b - 0.5d0) * log(c)) + (z + a))
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 = (x * Math.log(y)) + (y * i);
double tmp;
if (x <= -8.6e+177) {
tmp = t_1;
} else if (x <= 3.7e+205) {
tmp = (y * i) + (((b - 0.5) * Math.log(c)) + (z + a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * math.log(y)) + (y * i) tmp = 0 if x <= -8.6e+177: tmp = t_1 elif x <= 3.7e+205: tmp = (y * i) + (((b - 0.5) * math.log(c)) + (z + a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * log(y)) + Float64(y * i)) tmp = 0.0 if (x <= -8.6e+177) tmp = t_1; elseif (x <= 3.7e+205) tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(z + a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * log(y)) + (y * i); tmp = 0.0; if (x <= -8.6e+177) tmp = t_1; elseif (x <= 3.7e+205) tmp = (y * i) + (((b - 0.5) * log(c)) + (z + a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.6e+177], t$95$1, If[LessEqual[x, 3.7e+205], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y + y \cdot i\\
\mathbf{if}\;x \leq -8.6 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+205}:\\
\;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(z + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.60000000000000074e177 or 3.69999999999999981e205 < x Initial program 99.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6485.1%
Simplified85.1%
if -8.60000000000000074e177 < x < 3.69999999999999981e205Initial program 99.9%
Taylor expanded in z around inf
Simplified73.4%
Final simplification75.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 400.0) (+ a (+ (+ z t) (* (log c) (+ b -0.5)))) (if (<= y 2.3e+14) (+ (* x (log y)) a) (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 400.0) {
tmp = a + ((z + t) + (log(c) * (b + -0.5)));
} else if (y <= 2.3e+14) {
tmp = (x * log(y)) + a;
} else {
tmp = z + (y * i);
}
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 (y <= 400.0d0) then
tmp = a + ((z + t) + (log(c) * (b + (-0.5d0))))
else if (y <= 2.3d+14) then
tmp = (x * log(y)) + a
else
tmp = z + (y * i)
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 (y <= 400.0) {
tmp = a + ((z + t) + (Math.log(c) * (b + -0.5)));
} else if (y <= 2.3e+14) {
tmp = (x * Math.log(y)) + a;
} else {
tmp = z + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 400.0: tmp = a + ((z + t) + (math.log(c) * (b + -0.5))) elif y <= 2.3e+14: tmp = (x * math.log(y)) + a else: tmp = z + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 400.0) tmp = Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5)))); elseif (y <= 2.3e+14) tmp = Float64(Float64(x * log(y)) + a); else tmp = Float64(z + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 400.0) tmp = a + ((z + t) + (log(c) * (b + -0.5))); elseif (y <= 2.3e+14) tmp = (x * log(y)) + a; else tmp = z + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 400.0], N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+14], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 400:\\
\;\;\;\;a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \log y + a\\
\mathbf{else}:\\
\;\;\;\;z + y \cdot i\\
\end{array}
\end{array}
if y < 400Initial program 99.9%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified97.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6475.1%
Simplified75.1%
if 400 < y < 2.3e14Initial program 99.8%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified95.0%
Taylor expanded in a around inf
Simplified75.1%
if 2.3e14 < y Initial program 99.9%
Taylor expanded in z around inf
Simplified63.8%
Final simplification70.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 400.0) (+ (* (log c) (+ b -0.5)) (+ z a)) (if (<= y 2.65e+14) (+ (* x (log y)) a) (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 400.0) {
tmp = (log(c) * (b + -0.5)) + (z + a);
} else if (y <= 2.65e+14) {
tmp = (x * log(y)) + a;
} else {
tmp = z + (y * i);
}
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 (y <= 400.0d0) then
tmp = (log(c) * (b + (-0.5d0))) + (z + a)
else if (y <= 2.65d+14) then
tmp = (x * log(y)) + a
else
tmp = z + (y * i)
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 (y <= 400.0) {
tmp = (Math.log(c) * (b + -0.5)) + (z + a);
} else if (y <= 2.65e+14) {
tmp = (x * Math.log(y)) + a;
} else {
tmp = z + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 400.0: tmp = (math.log(c) * (b + -0.5)) + (z + a) elif y <= 2.65e+14: tmp = (x * math.log(y)) + a else: tmp = z + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 400.0) tmp = Float64(Float64(log(c) * Float64(b + -0.5)) + Float64(z + a)); elseif (y <= 2.65e+14) tmp = Float64(Float64(x * log(y)) + a); else tmp = Float64(z + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 400.0) tmp = (log(c) * (b + -0.5)) + (z + a); elseif (y <= 2.65e+14) tmp = (x * log(y)) + a; else tmp = z + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 400.0], N[(N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.65e+14], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 400:\\
\;\;\;\;\log c \cdot \left(b + -0.5\right) + \left(z + a\right)\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \log y + a\\
\mathbf{else}:\\
\;\;\;\;z + y \cdot i\\
\end{array}
\end{array}
if y < 400Initial program 99.9%
Taylor expanded in z around inf
Simplified58.0%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
+-lowering-+.f6455.9%
Simplified55.9%
if 400 < y < 2.65e14Initial program 99.8%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified95.0%
Taylor expanded in a around inf
Simplified75.1%
if 2.65e14 < y Initial program 99.9%
Taylor expanded in z around inf
Simplified63.8%
Final simplification59.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 400.0) (+ (+ z a) (* b (log c))) (if (<= y 4.1e+14) (+ (* x (log y)) a) (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 400.0) {
tmp = (z + a) + (b * log(c));
} else if (y <= 4.1e+14) {
tmp = (x * log(y)) + a;
} else {
tmp = z + (y * i);
}
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 (y <= 400.0d0) then
tmp = (z + a) + (b * log(c))
else if (y <= 4.1d+14) then
tmp = (x * log(y)) + a
else
tmp = z + (y * i)
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 (y <= 400.0) {
tmp = (z + a) + (b * Math.log(c));
} else if (y <= 4.1e+14) {
tmp = (x * Math.log(y)) + a;
} else {
tmp = z + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 400.0: tmp = (z + a) + (b * math.log(c)) elif y <= 4.1e+14: tmp = (x * math.log(y)) + a else: tmp = z + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 400.0) tmp = Float64(Float64(z + a) + Float64(b * log(c))); elseif (y <= 4.1e+14) tmp = Float64(Float64(x * log(y)) + a); else tmp = Float64(z + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 400.0) tmp = (z + a) + (b * log(c)); elseif (y <= 4.1e+14) tmp = (x * log(y)) + a; else tmp = z + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 400.0], N[(N[(z + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+14], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 400:\\
\;\;\;\;\left(z + a\right) + b \cdot \log c\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \log y + a\\
\mathbf{else}:\\
\;\;\;\;z + y \cdot i\\
\end{array}
\end{array}
if y < 400Initial program 99.9%
Taylor expanded in z around inf
Simplified58.0%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
+-lowering-+.f6455.9%
Simplified55.9%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6452.9%
Simplified52.9%
if 400 < y < 4.1e14Initial program 99.8%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified95.0%
Taylor expanded in a around inf
Simplified75.1%
if 4.1e14 < y Initial program 99.9%
Taylor expanded in z around inf
Simplified63.8%
Final simplification58.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.04e+117) (+ z (* y i)) (if (<= z -4.4e+68) (+ (* x (log y)) a) (+ a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.04e+117) {
tmp = z + (y * i);
} else if (z <= -4.4e+68) {
tmp = (x * log(y)) + a;
} else {
tmp = a + (y * i);
}
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 <= (-1.04d+117)) then
tmp = z + (y * i)
else if (z <= (-4.4d+68)) then
tmp = (x * log(y)) + a
else
tmp = a + (y * i)
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 <= -1.04e+117) {
tmp = z + (y * i);
} else if (z <= -4.4e+68) {
tmp = (x * Math.log(y)) + a;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.04e+117: tmp = z + (y * i) elif z <= -4.4e+68: tmp = (x * math.log(y)) + a else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.04e+117) tmp = Float64(z + Float64(y * i)); elseif (z <= -4.4e+68) tmp = Float64(Float64(x * log(y)) + a); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.04e+117) tmp = z + (y * i); elseif (z <= -4.4e+68) tmp = (x * log(y)) + a; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.04e+117], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e+68], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.04 \cdot 10^{+117}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \log y + a\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.03999999999999995e117Initial program 99.9%
Taylor expanded in z around inf
Simplified58.1%
if -1.03999999999999995e117 < z < -4.39999999999999974e68Initial program 100.0%
Taylor expanded in y around 0
associate-+r+N/A
sum4-defineN/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
sum4-defineN/A
associate-+r+N/A
associate-+r+N/A
Simplified100.0%
Taylor expanded in a around inf
Simplified78.4%
if -4.39999999999999974e68 < z Initial program 99.9%
Taylor expanded in a around inf
Simplified40.4%
Final simplification44.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.5e-68) z (if (<= a 1.5e+100) (* y i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.5e-68) {
tmp = z;
} else if (a <= 1.5e+100) {
tmp = y * i;
} else {
tmp = a;
}
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 (a <= 4.5d-68) then
tmp = z
else if (a <= 1.5d+100) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.5e-68) {
tmp = z;
} else if (a <= 1.5e+100) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.5e-68: tmp = z elif a <= 1.5e+100: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4.5e-68) tmp = z; elseif (a <= 1.5e+100) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 4.5e-68) tmp = z; elseif (a <= 1.5e+100) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.5e-68], z, If[LessEqual[a, 1.5e+100], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.5 \cdot 10^{-68}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+100}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.49999999999999999e-68Initial program 99.9%
Taylor expanded in z around inf
Simplified13.6%
if 4.49999999999999999e-68 < a < 1.49999999999999993e100Initial program 99.8%
Taylor expanded in y around inf
*-lowering-*.f6426.5%
Simplified26.5%
if 1.49999999999999993e100 < a Initial program 100.0%
Taylor expanded in a around inf
Simplified45.8%
Final simplification20.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.2e+117) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.2e+117) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
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 <= (-1.2d+117)) then
tmp = z + (y * i)
else
tmp = a + (y * i)
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 <= -1.2e+117) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.2e+117: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.2e+117) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.2e+117) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.2e+117], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+117}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.1999999999999999e117Initial program 99.9%
Taylor expanded in z around inf
Simplified58.1%
if -1.1999999999999999e117 < z Initial program 99.9%
Taylor expanded in a around inf
Simplified41.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -8.5e+140) z (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -8.5e+140) {
tmp = z;
} else {
tmp = a + (y * i);
}
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 <= (-8.5d+140)) then
tmp = z
else
tmp = a + (y * i)
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 <= -8.5e+140) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -8.5e+140: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -8.5e+140) tmp = z; else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -8.5e+140) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -8.5e+140], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+140}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -8.4999999999999996e140Initial program 99.9%
Taylor expanded in z around inf
Simplified44.7%
if -8.4999999999999996e140 < z Initial program 99.9%
Taylor expanded in a around inf
Simplified40.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.22e+56) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.22e+56) {
tmp = z;
} else {
tmp = a;
}
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 (a <= 1.22d+56) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.22e+56) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.22e+56: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.22e+56) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.22e+56) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.22e+56], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.22 \cdot 10^{+56}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1.22e56Initial program 99.9%
Taylor expanded in z around inf
Simplified15.0%
if 1.22e56 < a Initial program 100.0%
Taylor expanded in a around inf
Simplified41.7%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 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 = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
Taylor expanded in a around inf
Simplified15.5%
herbie shell --seed 2024158
(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)))