
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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 * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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 * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
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 * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.4%
Final simplification98.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5e+48)
(/ (* x (/ (pow z y) a)) y)
(if (<= y 0.019)
(/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)
(/ (* x (exp (- (- (* y (log z)) (log a)) b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5e+48) {
tmp = (x * (pow(z, y) / a)) / y;
} else if (y <= 0.019) {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
} else {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / 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 <= (-5d+48)) then
tmp = (x * ((z ** y) / a)) / y
else if (y <= 0.019d0) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
else
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / 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 <= -5e+48) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else if (y <= 0.019) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5e+48: tmp = (x * (math.pow(z, y) / a)) / y elif y <= 0.019: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y else: tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5e+48) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); elseif (y <= 0.019) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5e+48) tmp = (x * ((z ^ y) / a)) / y; elseif (y <= 0.019) tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; else tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5e+48], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 0.019], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+48}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{elif}\;y \leq 0.019:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if y < -4.99999999999999973e48Initial program 100.0%
Taylor expanded in t around 0 95.4%
+-commutative95.4%
mul-1-neg95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in b around 0 95.4%
div-exp95.4%
*-commutative95.4%
exp-to-pow95.4%
rem-exp-log95.4%
Simplified95.4%
if -4.99999999999999973e48 < y < 0.0189999999999999995Initial program 96.8%
*-commutative96.8%
associate-/l*92.9%
associate--l+92.9%
fma-define92.9%
sub-neg92.9%
metadata-eval92.9%
Simplified92.9%
Taylor expanded in y around 0 95.6%
if 0.0189999999999999995 < y Initial program 100.0%
Taylor expanded in t around 0 93.6%
+-commutative93.6%
mul-1-neg93.6%
unsub-neg93.6%
Simplified93.6%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -3.4e+36)
t_1
(if (<= y 6.5e-183)
(/ (/ x (* a (exp b))) y)
(if (<= y 0.00023) (* x (/ (/ (pow a (+ t -1.0)) y) (exp b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (pow(z, y) / a)) / y;
double tmp;
if (y <= -3.4e+36) {
tmp = t_1;
} else if (y <= 6.5e-183) {
tmp = (x / (a * exp(b))) / y;
} else if (y <= 0.00023) {
tmp = x * ((pow(a, (t + -1.0)) / y) / exp(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 = (x * ((z ** y) / a)) / y
if (y <= (-3.4d+36)) then
tmp = t_1
else if (y <= 6.5d-183) then
tmp = (x / (a * exp(b))) / y
else if (y <= 0.00023d0) then
tmp = x * (((a ** (t + (-1.0d0))) / y) / exp(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 = (x * (Math.pow(z, y) / a)) / y;
double tmp;
if (y <= -3.4e+36) {
tmp = t_1;
} else if (y <= 6.5e-183) {
tmp = (x / (a * Math.exp(b))) / y;
} else if (y <= 0.00023) {
tmp = x * ((Math.pow(a, (t + -1.0)) / y) / Math.exp(b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (math.pow(z, y) / a)) / y tmp = 0 if y <= -3.4e+36: tmp = t_1 elif y <= 6.5e-183: tmp = (x / (a * math.exp(b))) / y elif y <= 0.00023: tmp = x * ((math.pow(a, (t + -1.0)) / y) / math.exp(b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64((z ^ y) / a)) / y) tmp = 0.0 if (y <= -3.4e+36) tmp = t_1; elseif (y <= 6.5e-183) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); elseif (y <= 0.00023) tmp = Float64(x * Float64(Float64((a ^ Float64(t + -1.0)) / y) / exp(b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * ((z ^ y) / a)) / y; tmp = 0.0; if (y <= -3.4e+36) tmp = t_1; elseif (y <= 6.5e-183) tmp = (x / (a * exp(b))) / y; elseif (y <= 0.00023) tmp = x * (((a ^ (t + -1.0)) / y) / exp(b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.4e+36], t$95$1, If[LessEqual[y, 6.5e-183], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 0.00023], N[(x * N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-183}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{elif}\;y \leq 0.00023:\\
\;\;\;\;x \cdot \frac{\frac{{a}^{\left(t + -1\right)}}{y}}{e^{b}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.3999999999999998e36 or 2.3000000000000001e-4 < y Initial program 99.9%
Taylor expanded in t around 0 93.2%
+-commutative93.2%
mul-1-neg93.2%
unsub-neg93.2%
Simplified93.2%
Taylor expanded in b around 0 90.3%
div-exp90.3%
*-commutative90.3%
exp-to-pow90.3%
rem-exp-log90.3%
Simplified90.3%
if -3.3999999999999998e36 < y < 6.50000000000000014e-183Initial program 97.4%
Taylor expanded in t around 0 84.1%
+-commutative84.1%
mul-1-neg84.1%
unsub-neg84.1%
Simplified84.1%
Taylor expanded in y around 0 83.0%
exp-neg83.0%
associate-*r/83.0%
*-rgt-identity83.0%
+-commutative83.0%
exp-sum83.0%
rem-exp-log84.0%
Simplified84.0%
if 6.50000000000000014e-183 < y < 2.3000000000000001e-4Initial program 95.0%
associate-/l*92.6%
associate--l+92.6%
exp-sum92.6%
associate-/l*92.6%
*-commutative92.6%
exp-to-pow92.6%
exp-diff89.8%
*-commutative89.8%
exp-to-pow91.4%
sub-neg91.4%
metadata-eval91.4%
Simplified91.4%
Taylor expanded in y around 0 89.8%
associate-/r*89.8%
exp-to-pow91.4%
sub-neg91.4%
metadata-eval91.4%
Simplified91.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.25e+49) (not (<= y 58.0))) (/ (* x (/ (pow z y) a)) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.25e+49) || !(y <= 58.0)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / 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+49)) .or. (.not. (y <= 58.0d0))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / 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+49) || !(y <= 58.0)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.25e+49) or not (y <= 58.0): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.25e+49) || !(y <= 58.0)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.25e+49) || ~((y <= 58.0))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.25e+49], N[Not[LessEqual[y, 58.0]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+49} \lor \neg \left(y \leq 58\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -1.2500000000000001e49 or 58 < y Initial program 100.0%
Taylor expanded in t around 0 94.5%
+-commutative94.5%
mul-1-neg94.5%
unsub-neg94.5%
Simplified94.5%
Taylor expanded in b around 0 91.4%
div-exp91.4%
*-commutative91.4%
exp-to-pow91.4%
rem-exp-log91.4%
Simplified91.4%
if -1.2500000000000001e49 < y < 58Initial program 96.8%
*-commutative96.8%
associate-/l*92.9%
associate--l+92.9%
fma-define92.9%
sub-neg92.9%
metadata-eval92.9%
Simplified92.9%
Taylor expanded in y around 0 95.6%
Final simplification93.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.5e+28) (not (<= y 0.00023))) (/ (* x (/ (pow z y) a)) y) (/ (* x (/ (pow a (+ t -1.0)) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.5e+28) || !(y <= 0.00023)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x * (pow(a, (t + -1.0)) / exp(b))) / 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 <= (-8.5d+28)) .or. (.not. (y <= 0.00023d0))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x * ((a ** (t + (-1.0d0))) / exp(b))) / 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 <= -8.5e+28) || !(y <= 0.00023)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x * (Math.pow(a, (t + -1.0)) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.5e+28) or not (y <= 0.00023): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x * (math.pow(a, (t + -1.0)) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.5e+28) || !(y <= 0.00023)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x * Float64((a ^ Float64(t + -1.0)) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.5e+28) || ~((y <= 0.00023))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x * ((a ^ (t + -1.0)) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.5e+28], N[Not[LessEqual[y, 0.00023]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+28} \lor \neg \left(y \leq 0.00023\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -8.49999999999999954e28 or 2.3000000000000001e-4 < y Initial program 99.9%
Taylor expanded in t around 0 93.3%
+-commutative93.3%
mul-1-neg93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in b around 0 89.6%
div-exp89.6%
*-commutative89.6%
exp-to-pow89.6%
rem-exp-log89.6%
Simplified89.6%
if -8.49999999999999954e28 < y < 2.3000000000000001e-4Initial program 96.7%
Taylor expanded in y around 0 95.9%
div-exp87.8%
exp-to-pow89.0%
sub-neg89.0%
metadata-eval89.0%
Simplified89.0%
Final simplification89.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.8e+28) (not (<= y 0.000156))) (/ (* x (/ (pow z y) a)) y) (* (/ (pow a (+ t -1.0)) (exp b)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.8e+28) || !(y <= 0.000156)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (pow(a, (t + -1.0)) / exp(b)) * (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 <= (-5.8d+28)) .or. (.not. (y <= 0.000156d0))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = ((a ** (t + (-1.0d0))) / exp(b)) * (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 <= -5.8e+28) || !(y <= 0.000156)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (Math.pow(a, (t + -1.0)) / Math.exp(b)) * (x / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.8e+28) or not (y <= 0.000156): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (math.pow(a, (t + -1.0)) / math.exp(b)) * (x / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.8e+28) || !(y <= 0.000156)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64((a ^ Float64(t + -1.0)) / exp(b)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.8e+28) || ~((y <= 0.000156))) tmp = (x * ((z ^ y) / a)) / y; else tmp = ((a ^ (t + -1.0)) / exp(b)) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.8e+28], N[Not[LessEqual[y, 0.000156]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+28} \lor \neg \left(y \leq 0.000156\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t + -1\right)}}{e^{b}} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < -5.8000000000000002e28 or 1.56e-4 < y Initial program 99.9%
Taylor expanded in t around 0 93.3%
+-commutative93.3%
mul-1-neg93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in b around 0 89.6%
div-exp89.6%
*-commutative89.6%
exp-to-pow89.6%
rem-exp-log89.6%
Simplified89.6%
if -5.8000000000000002e28 < y < 1.56e-4Initial program 96.7%
*-commutative96.7%
associate-/l*92.6%
associate--l+92.6%
fma-define92.6%
sub-neg92.6%
metadata-eval92.6%
Simplified92.6%
Taylor expanded in y around 0 91.8%
div-exp83.6%
exp-to-pow85.2%
sub-neg85.2%
metadata-eval85.2%
Simplified85.2%
Final simplification87.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (exp (- b)) y))))
(if (<= b -12200000000.0)
t_1
(if (<= b -2.2e-300)
(/ (/ x a) y)
(if (<= b 3.8e-132)
(/ (* x (pow a t)) y)
(if (<= b 66000.0)
(/
x
(+
(* y a)
(*
b
(+
(* y a)
(*
b
(+ (* 0.16666666666666666 (* a (* y b))) (* (* y a) 0.5)))))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (exp(-b) / y);
double tmp;
if (b <= -12200000000.0) {
tmp = t_1;
} else if (b <= -2.2e-300) {
tmp = (x / a) / y;
} else if (b <= 3.8e-132) {
tmp = (x * pow(a, t)) / y;
} else if (b <= 66000.0) {
tmp = x / ((y * a) + (b * ((y * a) + (b * ((0.16666666666666666 * (a * (y * b))) + ((y * a) * 0.5))))));
} 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 = x * (exp(-b) / y)
if (b <= (-12200000000.0d0)) then
tmp = t_1
else if (b <= (-2.2d-300)) then
tmp = (x / a) / y
else if (b <= 3.8d-132) then
tmp = (x * (a ** t)) / y
else if (b <= 66000.0d0) then
tmp = x / ((y * a) + (b * ((y * a) + (b * ((0.16666666666666666d0 * (a * (y * b))) + ((y * a) * 0.5d0))))))
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 = x * (Math.exp(-b) / y);
double tmp;
if (b <= -12200000000.0) {
tmp = t_1;
} else if (b <= -2.2e-300) {
tmp = (x / a) / y;
} else if (b <= 3.8e-132) {
tmp = (x * Math.pow(a, t)) / y;
} else if (b <= 66000.0) {
tmp = x / ((y * a) + (b * ((y * a) + (b * ((0.16666666666666666 * (a * (y * b))) + ((y * a) * 0.5))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.exp(-b) / y) tmp = 0 if b <= -12200000000.0: tmp = t_1 elif b <= -2.2e-300: tmp = (x / a) / y elif b <= 3.8e-132: tmp = (x * math.pow(a, t)) / y elif b <= 66000.0: tmp = x / ((y * a) + (b * ((y * a) + (b * ((0.16666666666666666 * (a * (y * b))) + ((y * a) * 0.5)))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(exp(Float64(-b)) / y)) tmp = 0.0 if (b <= -12200000000.0) tmp = t_1; elseif (b <= -2.2e-300) tmp = Float64(Float64(x / a) / y); elseif (b <= 3.8e-132) tmp = Float64(Float64(x * (a ^ t)) / y); elseif (b <= 66000.0) tmp = Float64(x / Float64(Float64(y * a) + Float64(b * Float64(Float64(y * a) + Float64(b * Float64(Float64(0.16666666666666666 * Float64(a * Float64(y * b))) + Float64(Float64(y * a) * 0.5))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (exp(-b) / y); tmp = 0.0; if (b <= -12200000000.0) tmp = t_1; elseif (b <= -2.2e-300) tmp = (x / a) / y; elseif (b <= 3.8e-132) tmp = (x * (a ^ t)) / y; elseif (b <= 66000.0) tmp = x / ((y * a) + (b * ((y * a) + (b * ((0.16666666666666666 * (a * (y * b))) + ((y * a) * 0.5)))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -12200000000.0], t$95$1, If[LessEqual[b, -2.2e-300], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 3.8e-132], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 66000.0], N[(x / N[(N[(y * a), $MachinePrecision] + N[(b * N[(N[(y * a), $MachinePrecision] + N[(b * N[(N[(0.16666666666666666 * N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * a), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -12200000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.2 \cdot 10^{-300}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{-132}:\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{elif}\;b \leq 66000:\\
\;\;\;\;\frac{x}{y \cdot a + b \cdot \left(y \cdot a + b \cdot \left(0.16666666666666666 \cdot \left(a \cdot \left(y \cdot b\right)\right) + \left(y \cdot a\right) \cdot 0.5\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.22e10 or 66000 < b Initial program 100.0%
*-commutative100.0%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in b around inf 76.8%
neg-mul-176.8%
Simplified76.8%
Taylor expanded in b around inf 86.1%
associate-/l*86.1%
Simplified86.1%
if -1.22e10 < b < -2.20000000000000002e-300Initial program 97.6%
Taylor expanded in b around 0 97.5%
exp-sum86.2%
exp-to-pow87.6%
sub-neg87.6%
metadata-eval87.6%
*-commutative87.6%
exp-to-pow87.6%
Simplified87.6%
Taylor expanded in y around 0 67.6%
Simplified69.0%
Taylor expanded in t around 0 52.6%
if -2.20000000000000002e-300 < b < 3.7999999999999997e-132Initial program 97.0%
Taylor expanded in b around 0 97.0%
exp-sum91.6%
exp-to-pow92.0%
sub-neg92.0%
metadata-eval92.0%
*-commutative92.0%
exp-to-pow92.0%
Simplified92.0%
Taylor expanded in y around 0 65.5%
Simplified65.9%
Taylor expanded in t around inf 53.3%
if 3.7999999999999997e-132 < b < 66000Initial program 95.8%
associate-/l*93.6%
associate--l+93.6%
exp-sum82.8%
associate-/l*80.1%
*-commutative80.1%
exp-to-pow80.1%
exp-diff80.1%
*-commutative80.1%
exp-to-pow81.3%
sub-neg81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in t around 0 76.4%
associate-/l*76.3%
associate-*r*76.4%
Simplified76.4%
Taylor expanded in y around 0 56.2%
Taylor expanded in b around 0 55.9%
Final simplification68.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.05e+86)
(/ (* x (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666))))))) y)
(if (or (<= b -7e+22) (not (<= b 190000.0)))
(/ (/ x y) (exp b))
(/ (/ x a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+86) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else if ((b <= -7e+22) || !(b <= 190000.0)) {
tmp = (x / y) / exp(b);
} else {
tmp = (x / a) / 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 <= (-1.05d+86)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0)))))))) / y
else if ((b <= (-7d+22)) .or. (.not. (b <= 190000.0d0))) then
tmp = (x / y) / exp(b)
else
tmp = (x / a) / 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 <= -1.05e+86) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else if ((b <= -7e+22) || !(b <= 190000.0)) {
tmp = (x / y) / Math.exp(b);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.05e+86: tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y elif (b <= -7e+22) or not (b <= 190000.0): tmp = (x / y) / math.exp(b) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.05e+86) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666))))))) / y); elseif ((b <= -7e+22) || !(b <= 190000.0)) tmp = Float64(Float64(x / y) / exp(b)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.05e+86) tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y; elseif ((b <= -7e+22) || ~((b <= 190000.0))) tmp = (x / y) / exp(b); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.05e+86], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(0.5 + N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[b, -7e+22], N[Not[LessEqual[b, 190000.0]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+86}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right)}{y}\\
\mathbf{elif}\;b \leq -7 \cdot 10^{+22} \lor \neg \left(b \leq 190000\right):\\
\;\;\;\;\frac{\frac{x}{y}}{e^{b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -1.0499999999999999e86Initial program 100.0%
*-commutative100.0%
associate-/l*81.3%
associate--l+81.3%
fma-define81.3%
sub-neg81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in b around inf 75.0%
neg-mul-175.0%
Simplified75.0%
Taylor expanded in b around 0 75.1%
Taylor expanded in x around 0 87.7%
if -1.0499999999999999e86 < b < -7e22 or 1.9e5 < b Initial program 100.0%
*-commutative100.0%
associate-/l*91.8%
associate--l+91.8%
fma-define91.8%
sub-neg91.8%
metadata-eval91.8%
Simplified91.8%
Taylor expanded in b around inf 77.9%
neg-mul-177.9%
Simplified77.9%
Taylor expanded in b around inf 82.6%
*-commutative82.6%
associate-*r/77.9%
*-commutative77.9%
rec-exp77.9%
associate-*r/77.9%
*-rgt-identity77.9%
Simplified77.9%
if -7e22 < b < 1.9e5Initial program 97.0%
Taylor expanded in b around 0 96.3%
exp-sum86.2%
exp-to-pow87.2%
sub-neg87.2%
metadata-eval87.2%
*-commutative87.2%
exp-to-pow87.2%
Simplified87.2%
Taylor expanded in y around 0 65.7%
Simplified66.6%
Taylor expanded in t around 0 47.6%
Final simplification62.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.4e+36) (not (<= y 3.8e-5))) (/ (* x (/ (pow z y) a)) y) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.4e+36) || !(y <= 3.8e-5)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = (x / (a * exp(b))) / 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 <= (-3.4d+36)) .or. (.not. (y <= 3.8d-5))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = (x / (a * exp(b))) / 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 <= -3.4e+36) || !(y <= 3.8e-5)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.4e+36) or not (y <= 3.8e-5): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.4e+36) || !(y <= 3.8e-5)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.4e+36) || ~((y <= 3.8e-5))) tmp = (x * ((z ^ y) / a)) / y; else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.4e+36], N[Not[LessEqual[y, 3.8e-5]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+36} \lor \neg \left(y \leq 3.8 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if y < -3.3999999999999998e36 or 3.8000000000000002e-5 < y Initial program 99.9%
Taylor expanded in t around 0 92.5%
+-commutative92.5%
mul-1-neg92.5%
unsub-neg92.5%
Simplified92.5%
Taylor expanded in b around 0 89.6%
div-exp89.6%
*-commutative89.6%
exp-to-pow89.6%
rem-exp-log89.7%
Simplified89.7%
if -3.3999999999999998e36 < y < 3.8000000000000002e-5Initial program 96.7%
Taylor expanded in t around 0 78.1%
+-commutative78.1%
mul-1-neg78.1%
unsub-neg78.1%
Simplified78.1%
Taylor expanded in y around 0 77.3%
exp-neg77.3%
associate-*r/77.3%
*-rgt-identity77.3%
+-commutative77.3%
exp-sum77.3%
rem-exp-log78.5%
Simplified78.5%
Final simplification84.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -4.8e+31) (* x (/ (exp (- b)) y)) (if (<= b 1.35e-18) (* x (/ (pow z y) (* y a))) (/ (/ x (* a (exp b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.8e+31) {
tmp = x * (exp(-b) / y);
} else if (b <= 1.35e-18) {
tmp = x * (pow(z, y) / (y * a));
} else {
tmp = (x / (a * exp(b))) / 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 <= (-4.8d+31)) then
tmp = x * (exp(-b) / y)
else if (b <= 1.35d-18) then
tmp = x * ((z ** y) / (y * a))
else
tmp = (x / (a * exp(b))) / 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 <= -4.8e+31) {
tmp = x * (Math.exp(-b) / y);
} else if (b <= 1.35e-18) {
tmp = x * (Math.pow(z, y) / (y * a));
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.8e+31: tmp = x * (math.exp(-b) / y) elif b <= 1.35e-18: tmp = x * (math.pow(z, y) / (y * a)) else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.8e+31) tmp = Float64(x * Float64(exp(Float64(-b)) / y)); elseif (b <= 1.35e-18) tmp = Float64(x * Float64((z ^ y) / Float64(y * a))); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.8e+31) tmp = x * (exp(-b) / y); elseif (b <= 1.35e-18) tmp = x * ((z ^ y) / (y * a)); else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.8e+31], N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.35e-18], N[(x * N[(N[Power[z, y], $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \frac{e^{-b}}{y}\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{-18}:\\
\;\;\;\;x \cdot \frac{{z}^{y}}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if b < -4.79999999999999965e31Initial program 100.0%
*-commutative100.0%
associate-/l*87.0%
associate--l+87.0%
fma-define87.0%
sub-neg87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in b around inf 74.1%
neg-mul-174.1%
Simplified74.1%
Taylor expanded in b around inf 87.2%
associate-/l*87.2%
Simplified87.2%
if -4.79999999999999965e31 < b < 1.34999999999999994e-18Initial program 97.7%
Taylor expanded in t around 0 82.0%
+-commutative82.0%
mul-1-neg82.0%
unsub-neg82.0%
Simplified82.0%
Taylor expanded in b around 0 82.0%
associate-/l*78.1%
div-exp78.1%
*-commutative78.1%
exp-to-pow78.1%
rem-exp-log79.1%
associate-/r*70.8%
*-commutative70.8%
Simplified70.8%
if 1.34999999999999994e-18 < b Initial program 98.6%
Taylor expanded in t around 0 85.8%
+-commutative85.8%
mul-1-neg85.8%
unsub-neg85.8%
Simplified85.8%
Taylor expanded in y around 0 81.9%
exp-neg81.9%
associate-*r/81.9%
*-rgt-identity81.9%
+-commutative81.9%
exp-sum81.9%
rem-exp-log82.1%
Simplified82.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.4e+124) (not (<= t 5.8e+46))) (/ (* x (pow a t)) y) (/ (/ x (* a (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.4e+124) || !(t <= 5.8e+46)) {
tmp = (x * pow(a, t)) / y;
} else {
tmp = (x / (a * exp(b))) / 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 ((t <= (-2.4d+124)) .or. (.not. (t <= 5.8d+46))) then
tmp = (x * (a ** t)) / y
else
tmp = (x / (a * exp(b))) / 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 ((t <= -2.4e+124) || !(t <= 5.8e+46)) {
tmp = (x * Math.pow(a, t)) / y;
} else {
tmp = (x / (a * Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.4e+124) or not (t <= 5.8e+46): tmp = (x * math.pow(a, t)) / y else: tmp = (x / (a * math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.4e+124) || !(t <= 5.8e+46)) tmp = Float64(Float64(x * (a ^ t)) / y); else tmp = Float64(Float64(x / Float64(a * exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.4e+124) || ~((t <= 5.8e+46))) tmp = (x * (a ^ t)) / y; else tmp = (x / (a * exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.4e+124], N[Not[LessEqual[t, 5.8e+46]], $MachinePrecision]], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+124} \lor \neg \left(t \leq 5.8 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if t < -2.40000000000000006e124 or 5.8000000000000004e46 < t Initial program 100.0%
Taylor expanded in b around 0 93.4%
exp-sum76.5%
exp-to-pow76.5%
sub-neg76.5%
metadata-eval76.5%
*-commutative76.5%
exp-to-pow76.5%
Simplified76.5%
Taylor expanded in y around 0 85.6%
Simplified85.6%
Taylor expanded in t around inf 85.6%
if -2.40000000000000006e124 < t < 5.8000000000000004e46Initial program 97.5%
Taylor expanded in t around 0 94.9%
+-commutative94.9%
mul-1-neg94.9%
unsub-neg94.9%
Simplified94.9%
Taylor expanded in y around 0 70.6%
exp-neg70.6%
associate-*r/70.6%
*-rgt-identity70.6%
+-commutative70.6%
exp-sum70.6%
rem-exp-log71.5%
Simplified71.5%
Final simplification76.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.2e+124) (not (<= t 1.6e+44))) (/ (* x (pow a t)) y) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.2e+124) || !(t <= 1.6e+44)) {
tmp = (x * pow(a, t)) / y;
} else {
tmp = x / (a * (y * exp(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 ((t <= (-8.2d+124)) .or. (.not. (t <= 1.6d+44))) then
tmp = (x * (a ** t)) / y
else
tmp = x / (a * (y * exp(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 ((t <= -8.2e+124) || !(t <= 1.6e+44)) {
tmp = (x * Math.pow(a, t)) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.2e+124) or not (t <= 1.6e+44): tmp = (x * math.pow(a, t)) / y else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.2e+124) || !(t <= 1.6e+44)) tmp = Float64(Float64(x * (a ^ t)) / y); else tmp = Float64(x / Float64(a * Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.2e+124) || ~((t <= 1.6e+44))) tmp = (x * (a ^ t)) / y; else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.2e+124], N[Not[LessEqual[t, 1.6e+44]], $MachinePrecision]], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+124} \lor \neg \left(t \leq 1.6 \cdot 10^{+44}\right):\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -8.20000000000000002e124 or 1.60000000000000002e44 < t Initial program 100.0%
Taylor expanded in b around 0 93.4%
exp-sum76.5%
exp-to-pow76.5%
sub-neg76.5%
metadata-eval76.5%
*-commutative76.5%
exp-to-pow76.5%
Simplified76.5%
Taylor expanded in y around 0 85.6%
Simplified85.6%
Taylor expanded in t around inf 85.6%
if -8.20000000000000002e124 < t < 1.60000000000000002e44Initial program 97.5%
associate-/l*95.0%
associate--l+95.0%
exp-sum84.8%
associate-/l*81.9%
*-commutative81.9%
exp-to-pow81.9%
exp-diff78.3%
*-commutative78.3%
exp-to-pow79.2%
sub-neg79.2%
metadata-eval79.2%
Simplified79.2%
Taylor expanded in t around 0 81.3%
associate-/l*81.2%
associate-*r*75.8%
Simplified75.8%
Taylor expanded in y around 0 66.7%
Final simplification73.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -12200000000.0) (not (<= b 66000.0))) (* x (/ (exp (- b)) y)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -12200000000.0) || !(b <= 66000.0)) {
tmp = x * (exp(-b) / y);
} else {
tmp = (x / a) / 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 <= (-12200000000.0d0)) .or. (.not. (b <= 66000.0d0))) then
tmp = x * (exp(-b) / y)
else
tmp = (x / a) / 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 <= -12200000000.0) || !(b <= 66000.0)) {
tmp = x * (Math.exp(-b) / y);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -12200000000.0) or not (b <= 66000.0): tmp = x * (math.exp(-b) / y) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -12200000000.0) || !(b <= 66000.0)) tmp = Float64(x * Float64(exp(Float64(-b)) / y)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -12200000000.0) || ~((b <= 66000.0))) tmp = x * (exp(-b) / y); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -12200000000.0], N[Not[LessEqual[b, 66000.0]], $MachinePrecision]], N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -12200000000 \lor \neg \left(b \leq 66000\right):\\
\;\;\;\;x \cdot \frac{e^{-b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -1.22e10 or 66000 < b Initial program 100.0%
*-commutative100.0%
associate-/l*88.3%
associate--l+88.3%
fma-define88.3%
sub-neg88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in b around inf 76.8%
neg-mul-176.8%
Simplified76.8%
Taylor expanded in b around inf 86.1%
associate-/l*86.1%
Simplified86.1%
if -1.22e10 < b < 66000Initial program 97.0%
Taylor expanded in b around 0 96.2%
exp-sum86.6%
exp-to-pow87.6%
sub-neg87.6%
metadata-eval87.6%
*-commutative87.6%
exp-to-pow87.6%
Simplified87.6%
Taylor expanded in y around 0 65.7%
Simplified66.6%
Taylor expanded in t around 0 47.1%
Final simplification65.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4500000000000.0)
(/ (* x (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666))))))) y)
(if (<= b 2.05e-112)
(/ (/ x a) y)
(/
x
(*
a
(* y (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4500000000000.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else if (b <= 2.05e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
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 <= (-4500000000000.0d0)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0)))))))) / y
else if (b <= 2.05d-112) then
tmp = (x / a) / y
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0))))))))
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 <= -4500000000000.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else if (b <= 2.05e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4500000000000.0: tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y elif b <= 2.05e-112: tmp = (x / a) / y else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4500000000000.0) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666))))))) / y); elseif (b <= 2.05e-112) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4500000000000.0) tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y; elseif (b <= 2.05e-112) tmp = (x / a) / y; else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4500000000000.0], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(0.5 + N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2.05e-112], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4500000000000:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right)}{y}\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)\right)}\\
\end{array}
\end{array}
if b < -4.5e12Initial program 100.0%
*-commutative100.0%
associate-/l*86.0%
associate--l+86.0%
fma-define86.0%
sub-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in b around inf 74.2%
neg-mul-174.2%
Simplified74.2%
Taylor expanded in b around 0 59.0%
Taylor expanded in x around 0 68.9%
if -4.5e12 < b < 2.04999999999999998e-112Initial program 97.3%
Taylor expanded in b around 0 97.3%
exp-sum88.8%
exp-to-pow89.9%
sub-neg89.9%
metadata-eval89.9%
*-commutative89.9%
exp-to-pow89.9%
Simplified89.9%
Taylor expanded in y around 0 68.8%
Simplified69.9%
Taylor expanded in t around 0 46.6%
if 2.04999999999999998e-112 < b Initial program 98.7%
associate-/l*98.7%
associate--l+98.7%
exp-sum83.7%
associate-/l*82.7%
*-commutative82.7%
exp-to-pow82.7%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in t around 0 76.2%
associate-/l*76.2%
associate-*r*71.2%
Simplified71.2%
Taylor expanded in y around 0 75.8%
Taylor expanded in b around 0 67.8%
*-commutative67.8%
Simplified67.8%
Final simplification59.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -55000000000.0)
(/ (* x (+ 1.0 (* b (+ -1.0 (* b (+ 0.5 (* b -0.16666666666666666))))))) y)
(if (<= b 3.7e-112)
(/ (/ x a) y)
(/ x (* a (* y (+ 1.0 (* b (+ 1.0 (* b 0.5))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -55000000000.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else if (b <= 3.7e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (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) :: tmp
if (b <= (-55000000000.0d0)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * (0.5d0 + (b * (-0.16666666666666666d0)))))))) / y
else if (b <= 3.7d-112) then
tmp = (x / a) / y
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (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 tmp;
if (b <= -55000000000.0) {
tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y;
} else if (b <= 3.7e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -55000000000.0: tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y elif b <= 3.7e-112: tmp = (x / a) / y else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -55000000000.0) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * Float64(0.5 + Float64(b * -0.16666666666666666))))))) / y); elseif (b <= 3.7e-112) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -55000000000.0) tmp = (x * (1.0 + (b * (-1.0 + (b * (0.5 + (b * -0.16666666666666666))))))) / y; elseif (b <= 3.7e-112) tmp = (x / a) / y; else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -55000000000.0], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * N[(0.5 + N[(b * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 3.7e-112], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -55000000000:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right)}{y}\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -5.5e10Initial program 100.0%
*-commutative100.0%
associate-/l*86.0%
associate--l+86.0%
fma-define86.0%
sub-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in b around inf 74.2%
neg-mul-174.2%
Simplified74.2%
Taylor expanded in b around 0 59.0%
Taylor expanded in x around 0 68.9%
if -5.5e10 < b < 3.6999999999999998e-112Initial program 97.3%
Taylor expanded in b around 0 97.3%
exp-sum88.8%
exp-to-pow89.9%
sub-neg89.9%
metadata-eval89.9%
*-commutative89.9%
exp-to-pow89.9%
Simplified89.9%
Taylor expanded in y around 0 68.8%
Simplified69.9%
Taylor expanded in t around 0 46.6%
if 3.6999999999999998e-112 < b Initial program 98.7%
associate-/l*98.7%
associate--l+98.7%
exp-sum83.7%
associate-/l*82.7%
*-commutative82.7%
exp-to-pow82.7%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in t around 0 76.2%
associate-/l*76.2%
associate-*r*71.2%
Simplified71.2%
Taylor expanded in y around 0 75.8%
Taylor expanded in b around 0 63.2%
*-commutative63.2%
Simplified63.2%
Final simplification57.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.8e+30)
(/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y)
(if (<= b 3e-112)
(/ (/ x a) y)
(/ x (* a (* y (+ 1.0 (* b (+ 1.0 (* b 0.5))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.8e+30) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if (b <= 3e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (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) :: tmp
if (b <= (-1.8d+30)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else if (b <= 3d-112) then
tmp = (x / a) / y
else
tmp = x / (a * (y * (1.0d0 + (b * (1.0d0 + (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 tmp;
if (b <= -1.8e+30) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if (b <= 3e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.8e+30: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y elif b <= 3e-112: tmp = (x / a) / y else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.8e+30) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); elseif (b <= 3e-112) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.8e+30) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; elseif (b <= 3e-112) tmp = (x / a) / y; else tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.8e+30], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 3e-112], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.8000000000000001e30Initial program 100.0%
*-commutative100.0%
associate-/l*87.2%
associate--l+87.2%
fma-define87.2%
sub-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in b around inf 74.6%
neg-mul-174.6%
Simplified74.6%
Taylor expanded in b around 0 58.4%
Taylor expanded in b around 0 50.4%
*-commutative50.4%
Simplified50.4%
Taylor expanded in x around 0 60.9%
if -1.8000000000000001e30 < b < 3.0000000000000001e-112Initial program 97.4%
Taylor expanded in b around 0 97.3%
exp-sum88.2%
exp-to-pow89.3%
sub-neg89.3%
metadata-eval89.3%
*-commutative89.3%
exp-to-pow89.3%
Simplified89.3%
Taylor expanded in y around 0 68.7%
Simplified69.8%
Taylor expanded in t around 0 47.2%
if 3.0000000000000001e-112 < b Initial program 98.7%
associate-/l*98.7%
associate--l+98.7%
exp-sum83.7%
associate-/l*82.7%
*-commutative82.7%
exp-to-pow82.7%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in t around 0 76.2%
associate-/l*76.2%
associate-*r*71.2%
Simplified71.2%
Taylor expanded in y around 0 75.8%
Taylor expanded in b around 0 63.2%
*-commutative63.2%
Simplified63.2%
Final simplification55.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.3e+28) (/ (* x (+ 1.0 (* b (+ -1.0 (* b 0.5))))) y) (if (<= b 2.75e-112) (/ (/ x a) y) (/ x (* a (+ y (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.3e+28) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if (b <= 2.75e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * 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 (b <= (-2.3d+28)) then
tmp = (x * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))) / y
else if (b <= 2.75d-112) then
tmp = (x / a) / y
else
tmp = x / (a * (y + (y * 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 (b <= -2.3e+28) {
tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y;
} else if (b <= 2.75e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.3e+28: tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y elif b <= 2.75e-112: tmp = (x / a) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.3e+28) tmp = Float64(Float64(x * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))) / y); elseif (b <= 2.75e-112) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.3e+28) tmp = (x * (1.0 + (b * (-1.0 + (b * 0.5))))) / y; elseif (b <= 2.75e-112) tmp = (x / a) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.3e+28], N[(N[(x * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2.75e-112], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+28}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)}{y}\\
\mathbf{elif}\;b \leq 2.75 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -2.29999999999999984e28Initial program 100.0%
*-commutative100.0%
associate-/l*87.2%
associate--l+87.2%
fma-define87.2%
sub-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in b around inf 74.6%
neg-mul-174.6%
Simplified74.6%
Taylor expanded in b around 0 58.4%
Taylor expanded in b around 0 50.4%
*-commutative50.4%
Simplified50.4%
Taylor expanded in x around 0 60.9%
if -2.29999999999999984e28 < b < 2.75e-112Initial program 97.4%
Taylor expanded in b around 0 97.3%
exp-sum88.2%
exp-to-pow89.3%
sub-neg89.3%
metadata-eval89.3%
*-commutative89.3%
exp-to-pow89.3%
Simplified89.3%
Taylor expanded in y around 0 68.7%
Simplified69.8%
Taylor expanded in t around 0 47.2%
if 2.75e-112 < b Initial program 98.7%
associate-/l*98.7%
associate--l+98.7%
exp-sum83.7%
associate-/l*82.7%
*-commutative82.7%
exp-to-pow82.7%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in t around 0 76.2%
associate-/l*76.2%
associate-*r*71.2%
Simplified71.2%
Taylor expanded in y around 0 75.8%
Taylor expanded in b around 0 45.4%
Final simplification49.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.1e+24) (* (/ x y) (+ 1.0 (* b (+ -1.0 (* b 0.5))))) (if (<= b 2e-113) (/ (/ x a) y) (/ x (* a (+ y (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.1e+24) {
tmp = (x / y) * (1.0 + (b * (-1.0 + (b * 0.5))));
} else if (b <= 2e-113) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * 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 (b <= (-3.1d+24)) then
tmp = (x / y) * (1.0d0 + (b * ((-1.0d0) + (b * 0.5d0))))
else if (b <= 2d-113) then
tmp = (x / a) / y
else
tmp = x / (a * (y + (y * 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 (b <= -3.1e+24) {
tmp = (x / y) * (1.0 + (b * (-1.0 + (b * 0.5))));
} else if (b <= 2e-113) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.1e+24: tmp = (x / y) * (1.0 + (b * (-1.0 + (b * 0.5)))) elif b <= 2e-113: tmp = (x / a) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.1e+24) tmp = Float64(Float64(x / y) * Float64(1.0 + Float64(b * Float64(-1.0 + Float64(b * 0.5))))); elseif (b <= 2e-113) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.1e+24) tmp = (x / y) * (1.0 + (b * (-1.0 + (b * 0.5)))); elseif (b <= 2e-113) tmp = (x / a) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.1e+24], N[(N[(x / y), $MachinePrecision] * N[(1.0 + N[(b * N[(-1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e-113], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)\\
\mathbf{elif}\;b \leq 2 \cdot 10^{-113}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.10000000000000011e24Initial program 100.0%
*-commutative100.0%
associate-/l*87.2%
associate--l+87.2%
fma-define87.2%
sub-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in b around inf 74.6%
neg-mul-174.6%
Simplified74.6%
Taylor expanded in b around 0 50.4%
if -3.10000000000000011e24 < b < 1.99999999999999996e-113Initial program 97.4%
Taylor expanded in b around 0 97.3%
exp-sum88.2%
exp-to-pow89.3%
sub-neg89.3%
metadata-eval89.3%
*-commutative89.3%
exp-to-pow89.3%
Simplified89.3%
Taylor expanded in y around 0 68.7%
Simplified69.8%
Taylor expanded in t around 0 47.2%
if 1.99999999999999996e-113 < b Initial program 98.7%
associate-/l*98.7%
associate--l+98.7%
exp-sum83.7%
associate-/l*82.7%
*-commutative82.7%
exp-to-pow82.7%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in t around 0 76.2%
associate-/l*76.2%
associate-*r*71.2%
Simplified71.2%
Taylor expanded in y around 0 75.8%
Taylor expanded in b around 0 45.4%
Final simplification47.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9.5e+26) (- (/ x y) (* x (/ b y))) (if (<= b 5e-112) (/ (/ x a) y) (/ x (* a (+ y (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.5e+26) {
tmp = (x / y) - (x * (b / y));
} else if (b <= 5e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * 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 (b <= (-9.5d+26)) then
tmp = (x / y) - (x * (b / y))
else if (b <= 5d-112) then
tmp = (x / a) / y
else
tmp = x / (a * (y + (y * 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 (b <= -9.5e+26) {
tmp = (x / y) - (x * (b / y));
} else if (b <= 5e-112) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.5e+26: tmp = (x / y) - (x * (b / y)) elif b <= 5e-112: tmp = (x / a) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.5e+26) tmp = Float64(Float64(x / y) - Float64(x * Float64(b / y))); elseif (b <= 5e-112) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9.5e+26) tmp = (x / y) - (x * (b / y)); elseif (b <= 5e-112) tmp = (x / a) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.5e+26], N[(N[(x / y), $MachinePrecision] - N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e-112], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{y} - x \cdot \frac{b}{y}\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -9.50000000000000054e26Initial program 100.0%
*-commutative100.0%
associate-/l*87.2%
associate--l+87.2%
fma-define87.2%
sub-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in b around inf 74.6%
neg-mul-174.6%
Simplified74.6%
Taylor expanded in b around 0 58.4%
Taylor expanded in b around 0 50.4%
*-commutative50.4%
Simplified50.4%
Taylor expanded in b around 0 36.4%
+-commutative36.4%
mul-1-neg36.4%
*-commutative36.4%
unsub-neg36.4%
associate-*r/36.5%
Simplified36.5%
if -9.50000000000000054e26 < b < 5.00000000000000044e-112Initial program 97.4%
Taylor expanded in b around 0 97.3%
exp-sum88.2%
exp-to-pow89.3%
sub-neg89.3%
metadata-eval89.3%
*-commutative89.3%
exp-to-pow89.3%
Simplified89.3%
Taylor expanded in y around 0 68.7%
Simplified69.8%
Taylor expanded in t around 0 47.2%
if 5.00000000000000044e-112 < b Initial program 98.7%
associate-/l*98.7%
associate--l+98.7%
exp-sum83.7%
associate-/l*82.7%
*-commutative82.7%
exp-to-pow82.7%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in t around 0 76.2%
associate-/l*76.2%
associate-*r*71.2%
Simplified71.2%
Taylor expanded in y around 0 75.8%
Taylor expanded in b around 0 45.4%
Final simplification44.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -12500000000000.0) (- (/ x y) (* x (/ b y))) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -12500000000000.0) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = (x / a) / 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 <= (-12500000000000.0d0)) then
tmp = (x / y) - (x * (b / y))
else
tmp = (x / a) / 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 <= -12500000000000.0) {
tmp = (x / y) - (x * (b / y));
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -12500000000000.0: tmp = (x / y) - (x * (b / y)) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -12500000000000.0) tmp = Float64(Float64(x / y) - Float64(x * Float64(b / y))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -12500000000000.0) tmp = (x / y) - (x * (b / y)); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -12500000000000.0], N[(N[(x / y), $MachinePrecision] - N[(x * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -12500000000000:\\
\;\;\;\;\frac{x}{y} - x \cdot \frac{b}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -1.25e13Initial program 100.0%
*-commutative100.0%
associate-/l*86.0%
associate--l+86.0%
fma-define86.0%
sub-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in b around inf 74.2%
neg-mul-174.2%
Simplified74.2%
Taylor expanded in b around 0 59.0%
Taylor expanded in b around 0 51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in b around 0 38.3%
+-commutative38.3%
mul-1-neg38.3%
*-commutative38.3%
unsub-neg38.3%
associate-*r/38.3%
Simplified38.3%
if -1.25e13 < b Initial program 98.0%
Taylor expanded in b around 0 85.1%
exp-sum75.4%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
*-commutative76.1%
exp-to-pow76.1%
Simplified76.1%
Taylor expanded in y around 0 59.4%
Simplified60.0%
Taylor expanded in t around 0 37.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -360000000000.0) (* (/ x y) (- 1.0 b)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -360000000000.0) {
tmp = (x / y) * (1.0 - b);
} else {
tmp = (x / a) / 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 <= (-360000000000.0d0)) then
tmp = (x / y) * (1.0d0 - b)
else
tmp = (x / a) / 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 <= -360000000000.0) {
tmp = (x / y) * (1.0 - b);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -360000000000.0: tmp = (x / y) * (1.0 - b) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -360000000000.0) tmp = Float64(Float64(x / y) * Float64(1.0 - b)); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -360000000000.0) tmp = (x / y) * (1.0 - b); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -360000000000.0], N[(N[(x / y), $MachinePrecision] * N[(1.0 - b), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -360000000000:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -3.6e11Initial program 100.0%
*-commutative100.0%
associate-/l*86.0%
associate--l+86.0%
fma-define86.0%
sub-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in b around inf 74.2%
neg-mul-174.2%
Simplified74.2%
Taylor expanded in b around 0 34.5%
neg-mul-134.5%
unsub-neg34.5%
Simplified34.5%
if -3.6e11 < b Initial program 98.0%
Taylor expanded in b around 0 85.1%
exp-sum75.4%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
*-commutative76.1%
exp-to-pow76.1%
Simplified76.1%
Taylor expanded in y around 0 59.4%
Simplified60.0%
Taylor expanded in t around 0 37.6%
Final simplification37.0%
(FPCore (x y z t a b) :precision binary64 (/ (/ x a) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
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 / a) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
def code(x, y, z, t, a, b): return (x / a) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / a) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / a) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a}}{y}
\end{array}
Initial program 98.4%
Taylor expanded in b around 0 82.7%
exp-sum73.0%
exp-to-pow73.5%
sub-neg73.5%
metadata-eval73.5%
*-commutative73.5%
exp-to-pow73.5%
Simplified73.5%
Taylor expanded in y around 0 57.4%
Simplified57.9%
Taylor expanded in t around 0 34.7%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
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)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.4%
associate-/l*96.8%
associate--l+96.8%
exp-sum84.3%
associate-/l*82.3%
*-commutative82.3%
exp-to-pow82.3%
exp-diff73.7%
*-commutative73.7%
exp-to-pow74.3%
sub-neg74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in t around 0 73.2%
associate-/l*73.2%
associate-*r*68.1%
Simplified68.1%
Taylor expanded in y around 0 60.8%
Taylor expanded in b around 0 29.7%
Final simplification29.7%
(FPCore (x y z t a b) :precision binary64 (/ 1.0 (/ y x)))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (y / 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 = 1.0d0 / (y / x)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (y / x);
}
def code(x, y, z, t, a, b): return 1.0 / (y / x)
function code(x, y, z, t, a, b) return Float64(1.0 / Float64(y / x)) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 / (y / x); end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{y}{x}}
\end{array}
Initial program 98.4%
*-commutative98.4%
associate-/l*87.8%
associate--l+87.8%
fma-define87.8%
sub-neg87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in b around inf 46.7%
neg-mul-146.7%
Simplified46.7%
Taylor expanded in b around 0 18.3%
clear-num18.4%
inv-pow18.4%
Applied egg-rr18.4%
unpow-118.4%
Simplified18.4%
(FPCore (x y z t a b) :precision binary64 (/ x y))
double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / y;
}
def code(x, y, z, t, a, b): return x / y
function code(x, y, z, t, a, b) return Float64(x / y) end
function tmp = code(x, y, z, t, a, b) tmp = x / y; end
code[x_, y_, z_, t_, a_, b_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 98.4%
*-commutative98.4%
associate-/l*87.8%
associate--l+87.8%
fma-define87.8%
sub-neg87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in b around inf 46.7%
neg-mul-146.7%
Simplified46.7%
Taylor expanded in b around 0 18.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024172
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))