
(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 20 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.9%
Final simplification98.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.6e+247) (not (<= t 4.2e+94))) (/ (* x (pow a (+ t -1.0))) 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 ((t <= -8.6e+247) || !(t <= 4.2e+94)) {
tmp = (x * pow(a, (t + -1.0))) / 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 ((t <= (-8.6d+247)) .or. (.not. (t <= 4.2d+94))) then
tmp = (x * (a ** (t + (-1.0d0)))) / 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 ((t <= -8.6e+247) || !(t <= 4.2e+94)) {
tmp = (x * Math.pow(a, (t + -1.0))) / 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 (t <= -8.6e+247) or not (t <= 4.2e+94): tmp = (x * math.pow(a, (t + -1.0))) / 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 ((t <= -8.6e+247) || !(t <= 4.2e+94)) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / 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 ((t <= -8.6e+247) || ~((t <= 4.2e+94))) tmp = (x * (a ^ (t + -1.0))) / 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[Or[LessEqual[t, -8.6e+247], N[Not[LessEqual[t, 4.2e+94]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $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}\;t \leq -8.6 \cdot 10^{+247} \lor \neg \left(t \leq 4.2 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if t < -8.5999999999999996e247 or 4.19999999999999979e94 < t Initial program 100.0%
Taylor expanded in y around 0 92.6%
div-exp81.2%
exp-to-pow81.2%
sub-neg81.2%
metadata-eval81.2%
Simplified81.2%
Taylor expanded in b around 0 94.4%
exp-to-pow94.4%
sub-neg94.4%
metadata-eval94.4%
+-commutative94.4%
Simplified94.4%
if -8.5999999999999996e247 < t < 4.19999999999999979e94Initial program 98.6%
Taylor expanded in t around 0 93.5%
+-commutative93.5%
mul-1-neg93.5%
unsub-neg93.5%
Simplified93.5%
Final simplification93.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e+38) (not (<= y 0.4))) (* x (/ (/ (pow z y) a) y)) (/ (* x (/ (/ (pow a t) a) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2e+38) || !(y <= 0.4)) {
tmp = x * ((pow(z, y) / a) / y);
} else {
tmp = (x * ((pow(a, t) / 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 <= (-2d+38)) .or. (.not. (y <= 0.4d0))) then
tmp = x * (((z ** y) / a) / y)
else
tmp = (x * (((a ** t) / 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 <= -2e+38) || !(y <= 0.4)) {
tmp = x * ((Math.pow(z, y) / a) / y);
} else {
tmp = (x * ((Math.pow(a, t) / a) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e+38) or not (y <= 0.4): tmp = x * ((math.pow(z, y) / a) / y) else: tmp = (x * ((math.pow(a, t) / a) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2e+38) || !(y <= 0.4)) tmp = Float64(x * Float64(Float64((z ^ y) / a) / y)); else tmp = Float64(Float64(x * Float64(Float64((a ^ t) / a) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2e+38) || ~((y <= 0.4))) tmp = x * (((z ^ y) / a) / y); else tmp = (x * (((a ^ t) / a) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2e+38], N[Not[LessEqual[y, 0.4]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+38} \lor \neg \left(y \leq 0.4\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{\frac{{a}^{t}}{a}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -1.99999999999999995e38 or 0.40000000000000002 < y Initial program 99.9%
Taylor expanded in t around 0 95.1%
+-commutative95.1%
mul-1-neg95.1%
unsub-neg95.1%
Simplified95.1%
Taylor expanded in b around 0 87.4%
associate-/l*87.4%
div-exp87.4%
*-commutative87.4%
exp-to-pow87.4%
rem-exp-log87.4%
Simplified87.4%
if -1.99999999999999995e38 < y < 0.40000000000000002Initial program 97.9%
Taylor expanded in y around 0 96.7%
div-exp87.7%
exp-to-pow88.8%
sub-neg88.8%
metadata-eval88.8%
Simplified88.8%
unpow-prod-up88.9%
unpow-188.9%
Applied egg-rr88.9%
associate-*r/88.9%
*-rgt-identity88.9%
Simplified88.9%
Final simplification88.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (/ (pow z y) a) y))))
(if (<= y -250.0)
t_1
(if (<= y 6.6e-195)
(/ (/ x (* a (exp b))) y)
(if (<= y 0.38) (/ (* x (pow a (+ t -1.0))) y) 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 <= -250.0) {
tmp = t_1;
} else if (y <= 6.6e-195) {
tmp = (x / (a * exp(b))) / y;
} else if (y <= 0.38) {
tmp = (x * pow(a, (t + -1.0))) / y;
} 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 <= (-250.0d0)) then
tmp = t_1
else if (y <= 6.6d-195) then
tmp = (x / (a * exp(b))) / y
else if (y <= 0.38d0) then
tmp = (x * (a ** (t + (-1.0d0)))) / y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * ((Math.pow(z, y) / a) / y);
double tmp;
if (y <= -250.0) {
tmp = t_1;
} else if (y <= 6.6e-195) {
tmp = (x / (a * Math.exp(b))) / y;
} else if (y <= 0.38) {
tmp = (x * Math.pow(a, (t + -1.0))) / y;
} 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 <= -250.0: tmp = t_1 elif y <= 6.6e-195: tmp = (x / (a * math.exp(b))) / y elif y <= 0.38: tmp = (x * math.pow(a, (t + -1.0))) / y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64((z ^ y) / a) / y)) tmp = 0.0 if (y <= -250.0) tmp = t_1; elseif (y <= 6.6e-195) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); elseif (y <= 0.38) tmp = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y); 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 <= -250.0) tmp = t_1; elseif (y <= 6.6e-195) tmp = (x / (a * exp(b))) / y; elseif (y <= 0.38) tmp = (x * (a ^ (t + -1.0))) / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -250.0], t$95$1, If[LessEqual[y, 6.6e-195], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 0.38], N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -250:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-195}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{elif}\;y \leq 0.38:\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -250 or 0.38 < 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 85.5%
associate-/l*85.5%
div-exp85.5%
*-commutative85.5%
exp-to-pow85.5%
rem-exp-log85.5%
Simplified85.5%
if -250 < y < 6.6e-195Initial program 97.6%
Taylor expanded in y around 0 97.0%
div-exp88.2%
exp-to-pow89.2%
sub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in t around 0 78.2%
if 6.6e-195 < y < 0.38Initial program 97.9%
Taylor expanded in y around 0 97.9%
div-exp88.3%
exp-to-pow90.3%
sub-neg90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in b around 0 85.4%
exp-to-pow87.4%
sub-neg87.4%
metadata-eval87.4%
+-commutative87.4%
Simplified87.4%
Final simplification83.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -16.0) (not (<= y 0.27))) (* 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 <= -16.0) || !(y <= 0.27)) {
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 <= (-16.0d0)) .or. (.not. (y <= 0.27d0))) 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 <= -16.0) || !(y <= 0.27)) {
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 <= -16.0) or not (y <= 0.27): 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 <= -16.0) || !(y <= 0.27)) tmp = Float64(x * Float64(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 <= -16.0) || ~((y <= 0.27))) 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, -16.0], N[Not[LessEqual[y, 0.27]], $MachinePrecision]], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -16 \lor \neg \left(y \leq 0.27\right):\\
\;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\end{array}
\end{array}
if y < -16 or 0.27000000000000002 < y Initial program 99.9%
Taylor expanded in t around 0 92.6%
+-commutative92.6%
mul-1-neg92.6%
unsub-neg92.6%
Simplified92.6%
Taylor expanded in b around 0 84.8%
associate-/l*84.8%
div-exp84.8%
*-commutative84.8%
exp-to-pow84.8%
rem-exp-log84.8%
Simplified84.8%
if -16 < y < 0.27000000000000002Initial program 97.7%
Taylor expanded in y around 0 97.2%
div-exp88.1%
exp-to-pow89.4%
sub-neg89.4%
metadata-eval89.4%
Simplified89.4%
Taylor expanded in t around 0 74.1%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.2e-64) (/ (/ x (* a (exp b))) y) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.2e-64) {
tmp = (x / (a * exp(b))) / 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 (a <= 1.2d-64) then
tmp = (x / (a * exp(b))) / 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 (a <= 1.2e-64) {
tmp = (x / (a * Math.exp(b))) / y;
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1.2e-64: tmp = (x / (a * math.exp(b))) / y else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1.2e-64) tmp = Float64(Float64(x / Float64(a * exp(b))) / 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 (a <= 1.2e-64) tmp = (x / (a * exp(b))) / y; else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.2e-64], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $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}\;a \leq 1.2 \cdot 10^{-64}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if a < 1.19999999999999999e-64Initial program 99.1%
Taylor expanded in y around 0 77.6%
div-exp70.5%
exp-to-pow71.3%
sub-neg71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in t around 0 65.6%
if 1.19999999999999999e-64 < a Initial program 98.7%
associate-/l*99.3%
associate--l+99.3%
exp-sum78.9%
associate-/l*76.3%
*-commutative76.3%
exp-to-pow76.3%
exp-diff68.7%
*-commutative68.7%
exp-to-pow69.3%
sub-neg69.3%
metadata-eval69.3%
Simplified69.3%
Taylor expanded in t around 0 67.0%
times-frac65.7%
Simplified65.7%
Taylor expanded in y around 0 60.3%
(FPCore (x y z t a b) :precision binary64 (/ x (* a (* y (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * exp(b)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (a * (y * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (a * (y * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (a * (y * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(a * Float64(y * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (a * (y * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a \cdot \left(y \cdot e^{b}\right)}
\end{array}
Initial program 98.9%
associate-/l*97.2%
associate--l+97.2%
exp-sum78.9%
associate-/l*77.3%
*-commutative77.3%
exp-to-pow77.3%
exp-diff69.9%
*-commutative69.9%
exp-to-pow70.4%
sub-neg70.4%
metadata-eval70.4%
Simplified70.4%
Taylor expanded in t around 0 70.2%
times-frac66.6%
Simplified66.6%
Taylor expanded in y around 0 59.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.1e-43)
(+ (* b (* x (+ (* 0.5 (/ b (* y a))) (/ -1.0 (* y a))))) (/ x (* y a)))
(if (<= b 1.15e-56)
(* (/ 1.0 a) (/ x y))
(/
x
(*
a
(+
y
(* b (+ y (* b (+ (* 0.16666666666666666 (* y b)) (* y 0.5)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.1e-43) {
tmp = (b * (x * ((0.5 * (b / (y * a))) + (-1.0 / (y * a))))) + (x / (y * a));
} else if (b <= 1.15e-56) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 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.1d-43)) then
tmp = (b * (x * ((0.5d0 * (b / (y * a))) + ((-1.0d0) / (y * a))))) + (x / (y * a))
else if (b <= 1.15d-56) then
tmp = (1.0d0 / a) * (x / y)
else
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666d0 * (y * b)) + (y * 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.1e-43) {
tmp = (b * (x * ((0.5 * (b / (y * a))) + (-1.0 / (y * a))))) + (x / (y * a));
} else if (b <= 1.15e-56) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.1e-43: tmp = (b * (x * ((0.5 * (b / (y * a))) + (-1.0 / (y * a))))) + (x / (y * a)) elif b <= 1.15e-56: tmp = (1.0 / a) * (x / y) else: tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.1e-43) tmp = Float64(Float64(b * Float64(x * Float64(Float64(0.5 * Float64(b / Float64(y * a))) + Float64(-1.0 / Float64(y * a))))) + Float64(x / Float64(y * a))); elseif (b <= 1.15e-56) tmp = Float64(Float64(1.0 / a) * Float64(x / y)); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(b * Float64(Float64(0.16666666666666666 * Float64(y * b)) + Float64(y * 0.5)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.1e-43) tmp = (b * (x * ((0.5 * (b / (y * a))) + (-1.0 / (y * a))))) + (x / (y * a)); elseif (b <= 1.15e-56) tmp = (1.0 / a) * (x / y); else tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.1e-43], N[(N[(b * N[(x * N[(N[(0.5 * N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.15e-56], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(b * N[(N[(0.16666666666666666 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{-43}:\\
\;\;\;\;b \cdot \left(x \cdot \left(0.5 \cdot \frac{b}{y \cdot a} + \frac{-1}{y \cdot a}\right)\right) + \frac{x}{y \cdot a}\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{-56}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + b \cdot \left(0.16666666666666666 \cdot \left(y \cdot b\right) + y \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -1.09999999999999999e-43Initial program 99.7%
associate-/l*98.4%
associate--l+98.4%
exp-sum80.2%
associate-/l*80.2%
*-commutative80.2%
exp-to-pow80.2%
exp-diff66.6%
*-commutative66.6%
exp-to-pow66.7%
sub-neg66.7%
metadata-eval66.7%
Simplified66.7%
Taylor expanded in t around 0 73.0%
times-frac65.3%
Simplified65.3%
Taylor expanded in y around 0 76.3%
Taylor expanded in b around 0 40.5%
Taylor expanded in x around 0 58.8%
if -1.09999999999999999e-43 < b < 1.15000000000000001e-56Initial program 97.9%
associate-/l*95.0%
associate--l+95.0%
exp-sum81.0%
associate-/l*77.5%
*-commutative77.5%
exp-to-pow77.5%
exp-diff77.5%
*-commutative77.5%
exp-to-pow78.2%
sub-neg78.2%
metadata-eval78.2%
Simplified78.2%
Taylor expanded in t around 0 66.3%
times-frac69.6%
Simplified69.6%
Taylor expanded in y around 0 38.8%
Taylor expanded in b around 0 38.8%
*-un-lft-identity38.8%
times-frac44.5%
Applied egg-rr44.5%
if 1.15000000000000001e-56 < b Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum74.5%
associate-/l*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.8%
sub-neg61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in t around 0 73.7%
times-frac63.2%
Simplified63.2%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 60.7%
Final simplification53.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y a))))
(if (<= b -5e-47)
(+ t_1 (* b (* b (* 0.5 t_1))))
(if (<= b 2.4e-57)
(* (/ 1.0 a) (/ x y))
(/
x
(*
a
(+
y
(*
b
(+ y (* b (+ (* 0.16666666666666666 (* y b)) (* y 0.5))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double tmp;
if (b <= -5e-47) {
tmp = t_1 + (b * (b * (0.5 * t_1)));
} else if (b <= 2.4e-57) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (y * a)
if (b <= (-5d-47)) then
tmp = t_1 + (b * (b * (0.5d0 * t_1)))
else if (b <= 2.4d-57) then
tmp = (1.0d0 / a) * (x / y)
else
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666d0 * (y * b)) + (y * 0.5d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double tmp;
if (b <= -5e-47) {
tmp = t_1 + (b * (b * (0.5 * t_1)));
} else if (b <= 2.4e-57) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * a) tmp = 0 if b <= -5e-47: tmp = t_1 + (b * (b * (0.5 * t_1))) elif b <= 2.4e-57: tmp = (1.0 / a) * (x / y) else: tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * a)) tmp = 0.0 if (b <= -5e-47) tmp = Float64(t_1 + Float64(b * Float64(b * Float64(0.5 * t_1)))); elseif (b <= 2.4e-57) tmp = Float64(Float64(1.0 / a) * Float64(x / y)); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(b * Float64(Float64(0.16666666666666666 * Float64(y * b)) + Float64(y * 0.5)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (y * a); tmp = 0.0; if (b <= -5e-47) tmp = t_1 + (b * (b * (0.5 * t_1))); elseif (b <= 2.4e-57) tmp = (1.0 / a) * (x / y); else tmp = x / (a * (y + (b * (y + (b * ((0.16666666666666666 * (y * b)) + (y * 0.5))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5e-47], N[(t$95$1 + N[(b * N[(b * N[(0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e-57], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(b * N[(N[(0.16666666666666666 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot a}\\
\mathbf{if}\;b \leq -5 \cdot 10^{-47}:\\
\;\;\;\;t\_1 + b \cdot \left(b \cdot \left(0.5 \cdot t\_1\right)\right)\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{-57}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + b \cdot \left(0.16666666666666666 \cdot \left(y \cdot b\right) + y \cdot 0.5\right)\right)\right)}\\
\end{array}
\end{array}
if b < -5.00000000000000011e-47Initial program 99.7%
associate-/l*98.4%
associate--l+98.4%
exp-sum80.5%
associate-/l*80.5%
*-commutative80.5%
exp-to-pow80.5%
exp-diff67.1%
*-commutative67.1%
exp-to-pow67.2%
sub-neg67.2%
metadata-eval67.2%
Simplified67.2%
Taylor expanded in t around 0 71.9%
times-frac64.4%
Simplified64.4%
Taylor expanded in y around 0 75.2%
Taylor expanded in b around 0 39.9%
Taylor expanded in b around inf 39.9%
mul-1-neg39.9%
distribute-rgt-out56.5%
metadata-eval56.5%
distribute-rgt-neg-in56.5%
distribute-rgt-neg-in56.5%
metadata-eval56.5%
*-commutative56.5%
*-commutative56.5%
*-commutative56.5%
Simplified56.5%
if -5.00000000000000011e-47 < b < 2.40000000000000006e-57Initial program 97.9%
associate-/l*95.0%
associate--l+95.0%
exp-sum80.8%
associate-/l*77.3%
*-commutative77.3%
exp-to-pow77.3%
exp-diff77.3%
*-commutative77.3%
exp-to-pow78.0%
sub-neg78.0%
metadata-eval78.0%
Simplified78.0%
Taylor expanded in t around 0 66.8%
times-frac70.2%
Simplified70.2%
Taylor expanded in y around 0 39.1%
Taylor expanded in b around 0 39.1%
*-un-lft-identity39.1%
times-frac44.9%
Applied egg-rr44.9%
if 2.40000000000000006e-57 < b Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum74.5%
associate-/l*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.8%
sub-neg61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in t around 0 73.7%
times-frac63.2%
Simplified63.2%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 60.7%
Final simplification52.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y a))))
(if (<= b -4.1e-46)
(+ t_1 (* b (* b (* 0.5 t_1))))
(if (<= b 2e-56)
(* (/ 1.0 a) (/ x 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 t_1 = x / (y * a);
double tmp;
if (b <= -4.1e-46) {
tmp = t_1 + (b * (b * (0.5 * t_1)));
} else if (b <= 2e-56) {
tmp = (1.0 / a) * (x / 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) :: t_1
real(8) :: tmp
t_1 = x / (y * a)
if (b <= (-4.1d-46)) then
tmp = t_1 + (b * (b * (0.5d0 * t_1)))
else if (b <= 2d-56) then
tmp = (1.0d0 / a) * (x / 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 t_1 = x / (y * a);
double tmp;
if (b <= -4.1e-46) {
tmp = t_1 + (b * (b * (0.5 * t_1)));
} else if (b <= 2e-56) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * a) tmp = 0 if b <= -4.1e-46: tmp = t_1 + (b * (b * (0.5 * t_1))) elif b <= 2e-56: tmp = (1.0 / a) * (x / y) else: tmp = x / (a * (y * (1.0 + (b * (1.0 + (b * 0.5)))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * a)) tmp = 0.0 if (b <= -4.1e-46) tmp = Float64(t_1 + Float64(b * Float64(b * Float64(0.5 * t_1)))); elseif (b <= 2e-56) tmp = Float64(Float64(1.0 / a) * Float64(x / 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) t_1 = x / (y * a); tmp = 0.0; if (b <= -4.1e-46) tmp = t_1 + (b * (b * (0.5 * t_1))); elseif (b <= 2e-56) tmp = (1.0 / a) * (x / 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_] := Block[{t$95$1 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.1e-46], N[(t$95$1 + N[(b * N[(b * N[(0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e-56], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $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}
t_1 := \frac{x}{y \cdot a}\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{-46}:\\
\;\;\;\;t\_1 + b \cdot \left(b \cdot \left(0.5 \cdot t\_1\right)\right)\\
\mathbf{elif}\;b \leq 2 \cdot 10^{-56}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{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 < -4.0999999999999999e-46Initial program 99.7%
associate-/l*98.4%
associate--l+98.4%
exp-sum80.5%
associate-/l*80.5%
*-commutative80.5%
exp-to-pow80.5%
exp-diff67.1%
*-commutative67.1%
exp-to-pow67.2%
sub-neg67.2%
metadata-eval67.2%
Simplified67.2%
Taylor expanded in t around 0 71.9%
times-frac64.4%
Simplified64.4%
Taylor expanded in y around 0 75.2%
Taylor expanded in b around 0 39.9%
Taylor expanded in b around inf 39.9%
mul-1-neg39.9%
distribute-rgt-out56.5%
metadata-eval56.5%
distribute-rgt-neg-in56.5%
distribute-rgt-neg-in56.5%
metadata-eval56.5%
*-commutative56.5%
*-commutative56.5%
*-commutative56.5%
Simplified56.5%
if -4.0999999999999999e-46 < b < 2.0000000000000001e-56Initial program 97.9%
associate-/l*95.0%
associate--l+95.0%
exp-sum80.8%
associate-/l*77.3%
*-commutative77.3%
exp-to-pow77.3%
exp-diff77.3%
*-commutative77.3%
exp-to-pow78.0%
sub-neg78.0%
metadata-eval78.0%
Simplified78.0%
Taylor expanded in t around 0 66.8%
times-frac70.2%
Simplified70.2%
Taylor expanded in y around 0 39.1%
Taylor expanded in b around 0 39.1%
*-un-lft-identity39.1%
times-frac44.9%
Applied egg-rr44.9%
if 2.0000000000000001e-56 < b Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum74.5%
associate-/l*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.8%
sub-neg61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in t around 0 73.7%
times-frac63.2%
Simplified63.2%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 53.0%
Taylor expanded in y around 0 60.7%
Final simplification52.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.3e-20)
(- (/ x (* y a)) (/ (* x b) (* y a)))
(if (<= b 9e-57)
(* (/ 1.0 a) (/ x 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.3e-20) {
tmp = (x / (y * a)) - ((x * b) / (y * a));
} else if (b <= 9e-57) {
tmp = (1.0 / a) * (x / 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.3d-20)) then
tmp = (x / (y * a)) - ((x * b) / (y * a))
else if (b <= 9d-57) then
tmp = (1.0d0 / a) * (x / 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.3e-20) {
tmp = (x / (y * a)) - ((x * b) / (y * a));
} else if (b <= 9e-57) {
tmp = (1.0 / a) * (x / 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.3e-20: tmp = (x / (y * a)) - ((x * b) / (y * a)) elif b <= 9e-57: tmp = (1.0 / a) * (x / 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.3e-20) tmp = Float64(Float64(x / Float64(y * a)) - Float64(Float64(x * b) / Float64(y * a))); elseif (b <= 9e-57) tmp = Float64(Float64(1.0 / a) * Float64(x / 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.3e-20) tmp = (x / (y * a)) - ((x * b) / (y * a)); elseif (b <= 9e-57) tmp = (1.0 / a) * (x / 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.3e-20], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e-57], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $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.3 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{y \cdot a} - \frac{x \cdot b}{y \cdot a}\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-57}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{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.29999999999999997e-20Initial program 99.8%
associate-/l*99.8%
associate--l+99.8%
exp-sum82.0%
associate-/l*82.0%
*-commutative82.0%
exp-to-pow82.0%
exp-diff65.9%
*-commutative65.9%
exp-to-pow66.0%
sub-neg66.0%
metadata-eval66.0%
Simplified66.0%
Taylor expanded in t around 0 73.3%
times-frac64.4%
Simplified64.4%
Taylor expanded in y around 0 82.4%
Taylor expanded in b around 0 49.9%
if -1.29999999999999997e-20 < b < 8.99999999999999945e-57Initial program 98.1%
associate-/l*94.7%
associate--l+94.7%
exp-sum80.1%
associate-/l*76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-diff76.9%
*-commutative76.9%
exp-to-pow77.6%
sub-neg77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in t around 0 66.6%
times-frac69.6%
Simplified69.6%
Taylor expanded in y around 0 39.0%
Taylor expanded in b around 0 39.0%
*-un-lft-identity39.0%
times-frac44.3%
Applied egg-rr44.3%
if 8.99999999999999945e-57 < b Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum74.5%
associate-/l*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.8%
sub-neg61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in t around 0 73.7%
times-frac63.2%
Simplified63.2%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 53.0%
Taylor expanded in y around 0 60.7%
Final simplification50.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.25e-20) (- (/ x (* y a)) (/ (* x b) (* y a))) (if (<= b 2.6e-55) (* (/ 1.0 a) (/ x y)) (/ x (* a (+ y (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.25e-20) {
tmp = (x / (y * a)) - ((x * b) / (y * a));
} else if (b <= 2.6e-55) {
tmp = (1.0 / a) * (x / 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 <= (-1.25d-20)) then
tmp = (x / (y * a)) - ((x * b) / (y * a))
else if (b <= 2.6d-55) then
tmp = (1.0d0 / a) * (x / 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 <= -1.25e-20) {
tmp = (x / (y * a)) - ((x * b) / (y * a));
} else if (b <= 2.6e-55) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.25e-20: tmp = (x / (y * a)) - ((x * b) / (y * a)) elif b <= 2.6e-55: tmp = (1.0 / a) * (x / y) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.25e-20) tmp = Float64(Float64(x / Float64(y * a)) - Float64(Float64(x * b) / Float64(y * a))); elseif (b <= 2.6e-55) tmp = Float64(Float64(1.0 / a) * Float64(x / 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 <= -1.25e-20) tmp = (x / (y * a)) - ((x * b) / (y * a)); elseif (b <= 2.6e-55) tmp = (1.0 / a) * (x / y); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.25e-20], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(x * b), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.6e-55], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{y \cdot a} - \frac{x \cdot b}{y \cdot a}\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.25e-20Initial program 99.8%
associate-/l*99.8%
associate--l+99.8%
exp-sum82.0%
associate-/l*82.0%
*-commutative82.0%
exp-to-pow82.0%
exp-diff65.9%
*-commutative65.9%
exp-to-pow66.0%
sub-neg66.0%
metadata-eval66.0%
Simplified66.0%
Taylor expanded in t around 0 73.3%
times-frac64.4%
Simplified64.4%
Taylor expanded in y around 0 82.4%
Taylor expanded in b around 0 49.9%
if -1.25e-20 < b < 2.5999999999999999e-55Initial program 98.1%
associate-/l*94.7%
associate--l+94.7%
exp-sum80.1%
associate-/l*76.9%
*-commutative76.9%
exp-to-pow76.9%
exp-diff76.9%
*-commutative76.9%
exp-to-pow77.6%
sub-neg77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in t around 0 66.6%
times-frac69.6%
Simplified69.6%
Taylor expanded in y around 0 39.0%
Taylor expanded in b around 0 39.0%
*-un-lft-identity39.0%
times-frac44.3%
Applied egg-rr44.3%
if 2.5999999999999999e-55 < b Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum74.5%
associate-/l*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.8%
sub-neg61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in t around 0 73.7%
times-frac63.2%
Simplified63.2%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 38.4%
Final simplification43.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6e-44) (- (/ x (* y a)) (* (/ x a) (/ b y))) (if (<= b 1.1e-54) (* (/ 1.0 a) (/ x y)) (/ x (* a (+ y (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e-44) {
tmp = (x / (y * a)) - ((x / a) * (b / y));
} else if (b <= 1.1e-54) {
tmp = (1.0 / a) * (x / 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 <= (-6d-44)) then
tmp = (x / (y * a)) - ((x / a) * (b / y))
else if (b <= 1.1d-54) then
tmp = (1.0d0 / a) * (x / 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 <= -6e-44) {
tmp = (x / (y * a)) - ((x / a) * (b / y));
} else if (b <= 1.1e-54) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6e-44: tmp = (x / (y * a)) - ((x / a) * (b / y)) elif b <= 1.1e-54: tmp = (1.0 / a) * (x / y) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6e-44) tmp = Float64(Float64(x / Float64(y * a)) - Float64(Float64(x / a) * Float64(b / y))); elseif (b <= 1.1e-54) tmp = Float64(Float64(1.0 / a) * Float64(x / 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 <= -6e-44) tmp = (x / (y * a)) - ((x / a) * (b / y)); elseif (b <= 1.1e-54) tmp = (1.0 / a) * (x / y); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6e-44], N[(N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(x / a), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e-54], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{-44}:\\
\;\;\;\;\frac{x}{y \cdot a} - \frac{x}{a} \cdot \frac{b}{y}\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-54}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -6.0000000000000005e-44Initial program 99.7%
associate-/l*98.4%
associate--l+98.4%
exp-sum80.2%
associate-/l*80.2%
*-commutative80.2%
exp-to-pow80.2%
exp-diff66.6%
*-commutative66.6%
exp-to-pow66.7%
sub-neg66.7%
metadata-eval66.7%
Simplified66.7%
Taylor expanded in t around 0 73.0%
times-frac65.3%
Simplified65.3%
Taylor expanded in y around 0 76.3%
Taylor expanded in b around 0 26.0%
Taylor expanded in b around 0 47.2%
+-commutative47.2%
mul-1-neg47.2%
unsub-neg47.2%
*-commutative47.2%
*-commutative47.2%
times-frac47.2%
Simplified47.2%
if -6.0000000000000005e-44 < b < 1.1e-54Initial program 97.9%
associate-/l*95.0%
associate--l+95.0%
exp-sum81.0%
associate-/l*77.5%
*-commutative77.5%
exp-to-pow77.5%
exp-diff77.5%
*-commutative77.5%
exp-to-pow78.2%
sub-neg78.2%
metadata-eval78.2%
Simplified78.2%
Taylor expanded in t around 0 66.3%
times-frac69.6%
Simplified69.6%
Taylor expanded in y around 0 38.8%
Taylor expanded in b around 0 38.8%
*-un-lft-identity38.8%
times-frac44.5%
Applied egg-rr44.5%
if 1.1e-54 < b Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum74.5%
associate-/l*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.8%
sub-neg61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in t around 0 73.7%
times-frac63.2%
Simplified63.2%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 38.4%
Final simplification43.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* y a))))
(if (<= b -7.5e-46)
(- t_1 (* b t_1))
(if (<= b 6e-55) (* (/ 1.0 a) (/ x y)) (/ x (* a (+ y (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (y * a);
double tmp;
if (b <= -7.5e-46) {
tmp = t_1 - (b * t_1);
} else if (b <= 6e-55) {
tmp = (1.0 / a) * (x / 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) :: t_1
real(8) :: tmp
t_1 = x / (y * a)
if (b <= (-7.5d-46)) then
tmp = t_1 - (b * t_1)
else if (b <= 6d-55) then
tmp = (1.0d0 / a) * (x / 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 t_1 = x / (y * a);
double tmp;
if (b <= -7.5e-46) {
tmp = t_1 - (b * t_1);
} else if (b <= 6e-55) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (y * a) tmp = 0 if b <= -7.5e-46: tmp = t_1 - (b * t_1) elif b <= 6e-55: tmp = (1.0 / a) * (x / y) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(y * a)) tmp = 0.0 if (b <= -7.5e-46) tmp = Float64(t_1 - Float64(b * t_1)); elseif (b <= 6e-55) tmp = Float64(Float64(1.0 / a) * Float64(x / 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) t_1 = x / (y * a); tmp = 0.0; if (b <= -7.5e-46) tmp = t_1 - (b * t_1); elseif (b <= 6e-55) tmp = (1.0 / a) * (x / y); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.5e-46], N[(t$95$1 - N[(b * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e-55], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot a}\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{-46}:\\
\;\;\;\;t\_1 - b \cdot t\_1\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-55}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -7.50000000000000027e-46Initial program 99.7%
associate-/l*98.4%
associate--l+98.4%
exp-sum80.5%
associate-/l*80.5%
*-commutative80.5%
exp-to-pow80.5%
exp-diff67.1%
*-commutative67.1%
exp-to-pow67.2%
sub-neg67.2%
metadata-eval67.2%
Simplified67.2%
Taylor expanded in t around 0 71.9%
times-frac64.4%
Simplified64.4%
Taylor expanded in y around 0 75.2%
Taylor expanded in b around 0 46.5%
+-commutative46.5%
mul-1-neg46.5%
unsub-neg46.5%
associate-/l*45.2%
Simplified45.2%
if -7.50000000000000027e-46 < b < 6.00000000000000033e-55Initial program 97.9%
associate-/l*95.0%
associate--l+95.0%
exp-sum80.8%
associate-/l*77.3%
*-commutative77.3%
exp-to-pow77.3%
exp-diff77.3%
*-commutative77.3%
exp-to-pow78.0%
sub-neg78.0%
metadata-eval78.0%
Simplified78.0%
Taylor expanded in t around 0 66.8%
times-frac70.2%
Simplified70.2%
Taylor expanded in y around 0 39.1%
Taylor expanded in b around 0 39.1%
*-un-lft-identity39.1%
times-frac44.9%
Applied egg-rr44.9%
if 6.00000000000000033e-55 < b Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum74.5%
associate-/l*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.8%
sub-neg61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in t around 0 73.7%
times-frac63.2%
Simplified63.2%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 38.4%
Final simplification43.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b 5.8e-55) (* (/ 1.0 a) (/ x y)) (/ x (* a (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 5.8e-55) {
tmp = (1.0 / a) * (x / 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 <= 5.8d-55) then
tmp = (1.0d0 / a) * (x / 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 <= 5.8e-55) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 5.8e-55: tmp = (1.0 / a) * (x / y) else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 5.8e-55) tmp = Float64(Float64(1.0 / a) * Float64(x / 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 <= 5.8e-55) tmp = (1.0 / a) * (x / y); else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 5.8e-55], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.8 \cdot 10^{-55}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < 5.8e-55Initial program 98.6%
associate-/l*96.3%
associate--l+96.3%
exp-sum80.7%
associate-/l*78.5%
*-commutative78.5%
exp-to-pow78.5%
exp-diff73.5%
*-commutative73.5%
exp-to-pow74.0%
sub-neg74.0%
metadata-eval74.0%
Simplified74.0%
Taylor expanded in t around 0 68.7%
times-frac68.0%
Simplified68.0%
Taylor expanded in y around 0 52.5%
Taylor expanded in b around 0 36.1%
*-un-lft-identity36.1%
times-frac38.7%
Applied egg-rr38.7%
if 5.8e-55 < b Initial program 99.5%
associate-/l*99.5%
associate--l+99.5%
exp-sum74.5%
associate-/l*74.5%
*-commutative74.5%
exp-to-pow74.5%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.8%
sub-neg61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in t around 0 73.7%
times-frac63.2%
Simplified63.2%
Taylor expanded in y around 0 75.9%
Taylor expanded in b around 0 38.4%
Final simplification38.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a 2e-91) (* (/ x a) (/ 1.0 y)) (/ 1.0 (/ (* y a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 2e-91) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = 1.0 / ((y * a) / x);
}
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 (a <= 2d-91) then
tmp = (x / a) * (1.0d0 / y)
else
tmp = 1.0d0 / ((y * a) / x)
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 (a <= 2e-91) {
tmp = (x / a) * (1.0 / y);
} else {
tmp = 1.0 / ((y * a) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 2e-91: tmp = (x / a) * (1.0 / y) else: tmp = 1.0 / ((y * a) / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 2e-91) tmp = Float64(Float64(x / a) * Float64(1.0 / y)); else tmp = Float64(1.0 / Float64(Float64(y * a) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 2e-91) tmp = (x / a) * (1.0 / y); else tmp = 1.0 / ((y * a) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 2e-91], N[(N[(x / a), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2 \cdot 10^{-91}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y \cdot a}{x}}\\
\end{array}
\end{array}
if a < 2.00000000000000004e-91Initial program 99.2%
associate-/l*93.5%
associate--l+93.5%
exp-sum79.9%
associate-/l*79.9%
*-commutative79.9%
exp-to-pow79.9%
exp-diff71.9%
*-commutative71.9%
exp-to-pow72.0%
sub-neg72.0%
metadata-eval72.0%
Simplified72.0%
Taylor expanded in t around 0 76.7%
times-frac70.6%
Simplified70.6%
Taylor expanded in y around 0 61.7%
Taylor expanded in b around 0 26.6%
div-inv26.6%
metadata-eval26.6%
frac-times26.6%
associate-*r*36.0%
div-inv36.0%
Applied egg-rr36.0%
if 2.00000000000000004e-91 < a Initial program 98.7%
associate-/l*99.2%
associate--l+99.2%
exp-sum78.3%
associate-/l*76.0%
*-commutative76.0%
exp-to-pow76.0%
exp-diff68.8%
*-commutative68.8%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in b around 0 65.5%
associate-/l*66.0%
associate-/l*66.0%
exp-to-pow66.6%
sub-neg66.6%
metadata-eval66.6%
Simplified66.6%
Taylor expanded in y around 0 58.4%
Taylor expanded in t around 0 32.7%
frac-times33.2%
metadata-eval33.2%
div-inv33.2%
clear-num34.1%
Applied egg-rr34.1%
Final simplification34.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a 2e+49) (* (/ 1.0 a) (/ x y)) (* x (/ 1.0 (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 2e+49) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x * (1.0 / (y * a));
}
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 (a <= 2d+49) then
tmp = (1.0d0 / a) * (x / y)
else
tmp = x * (1.0d0 / (y * a))
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 (a <= 2e+49) {
tmp = (1.0 / a) * (x / y);
} else {
tmp = x * (1.0 / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 2e+49: tmp = (1.0 / a) * (x / y) else: tmp = x * (1.0 / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 2e+49) tmp = Float64(Float64(1.0 / a) * Float64(x / y)); else tmp = Float64(x * Float64(1.0 / Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 2e+49) tmp = (1.0 / a) * (x / y); else tmp = x * (1.0 / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 2e+49], N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2 \cdot 10^{+49}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\end{array}
\end{array}
if a < 1.99999999999999989e49Initial program 99.2%
associate-/l*95.7%
associate--l+95.6%
exp-sum77.5%
associate-/l*76.8%
*-commutative76.8%
exp-to-pow76.8%
exp-diff69.8%
*-commutative69.8%
exp-to-pow70.1%
sub-neg70.1%
metadata-eval70.1%
Simplified70.1%
Taylor expanded in t around 0 74.7%
times-frac70.2%
Simplified70.2%
Taylor expanded in y around 0 59.0%
Taylor expanded in b around 0 26.6%
*-un-lft-identity26.6%
times-frac32.4%
Applied egg-rr32.4%
if 1.99999999999999989e49 < a Initial program 98.5%
Taylor expanded in t around 0 79.1%
+-commutative79.1%
mul-1-neg79.1%
unsub-neg79.1%
Simplified79.1%
Taylor expanded in b around 0 57.7%
associate-/l*57.6%
div-exp57.6%
*-commutative57.6%
exp-to-pow57.6%
rem-exp-log58.2%
Simplified58.2%
Taylor expanded in y around 0 36.4%
Final simplification34.2%
(FPCore (x y z t a b) :precision binary64 (if (<= a 5e-75) (/ (/ x a) y) (* x (/ 1.0 (* y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 5e-75) {
tmp = (x / a) / y;
} else {
tmp = x * (1.0 / (y * a));
}
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 (a <= 5d-75) then
tmp = (x / a) / y
else
tmp = x * (1.0d0 / (y * a))
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 (a <= 5e-75) {
tmp = (x / a) / y;
} else {
tmp = x * (1.0 / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 5e-75: tmp = (x / a) / y else: tmp = x * (1.0 / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 5e-75) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x * Float64(1.0 / Float64(y * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 5e-75) tmp = (x / a) / y; else tmp = x * (1.0 / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 5e-75], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\end{array}
\end{array}
if a < 4.99999999999999979e-75Initial program 99.1%
Taylor expanded in y around 0 77.3%
div-exp70.2%
exp-to-pow71.0%
sub-neg71.0%
metadata-eval71.0%
Simplified71.0%
Taylor expanded in b around 0 54.5%
exp-to-pow55.3%
sub-neg55.3%
metadata-eval55.3%
+-commutative55.3%
Simplified55.3%
Taylor expanded in t around 0 34.6%
if 4.99999999999999979e-75 < a Initial program 98.7%
Taylor expanded in t around 0 80.6%
+-commutative80.6%
mul-1-neg80.6%
unsub-neg80.6%
Simplified80.6%
Taylor expanded in b around 0 56.7%
associate-/l*57.3%
div-exp57.3%
*-commutative57.3%
exp-to-pow57.3%
rem-exp-log57.9%
Simplified57.9%
Taylor expanded in y around 0 33.9%
Final simplification34.2%
(FPCore (x y z t a b) :precision binary64 (if (<= a 2.35e-91) (/ (/ x a) y) (/ x (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 2.35e-91) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
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 (a <= 2.35d-91) then
tmp = (x / a) / y
else
tmp = x / (y * a)
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 (a <= 2.35e-91) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 2.35e-91: tmp = (x / a) / y else: tmp = x / (y * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 2.35e-91) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 2.35e-91) tmp = (x / a) / y; else tmp = x / (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 2.35e-91], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.35 \cdot 10^{-91}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 2.35000000000000003e-91Initial program 99.2%
Taylor expanded in y around 0 81.6%
div-exp73.6%
exp-to-pow74.3%
sub-neg74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in b around 0 57.3%
exp-to-pow58.0%
sub-neg58.0%
metadata-eval58.0%
+-commutative58.0%
Simplified58.0%
Taylor expanded in t around 0 36.0%
if 2.35000000000000003e-91 < a Initial program 98.7%
associate-/l*99.2%
associate--l+99.2%
exp-sum78.3%
associate-/l*76.0%
*-commutative76.0%
exp-to-pow76.0%
exp-diff68.8%
*-commutative68.8%
exp-to-pow69.5%
sub-neg69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in t around 0 66.8%
times-frac64.4%
Simplified64.4%
Taylor expanded in y around 0 58.3%
Taylor expanded in b around 0 33.2%
Final simplification34.2%
(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.9%
associate-/l*97.2%
associate--l+97.2%
exp-sum78.9%
associate-/l*77.3%
*-commutative77.3%
exp-to-pow77.3%
exp-diff69.9%
*-commutative69.9%
exp-to-pow70.4%
sub-neg70.4%
metadata-eval70.4%
Simplified70.4%
Taylor expanded in t around 0 70.2%
times-frac66.6%
Simplified66.6%
Taylor expanded in y around 0 59.5%
Taylor expanded in b around 0 30.9%
Final simplification30.9%
(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 2024100
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:alt
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))