
(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 19 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 97.6%
Final simplification97.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.1e+20) (not (<= y 6.8e+79))) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) 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 <= -4.1e+20) || !(y <= 6.8e+79)) {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / 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 <= (-4.1d+20)) .or. (.not. (y <= 6.8d+79))) then
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / 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 <= -4.1e+20) || !(y <= 6.8e+79)) {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / 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 <= -4.1e+20) or not (y <= 6.8e+79): tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / 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 <= -4.1e+20) || !(y <= 6.8e+79)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / 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 <= -4.1e+20) || ~((y <= 6.8e+79))) tmp = (x * exp((((y * log(z)) - log(a)) - b))) / 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, -4.1e+20], N[Not[LessEqual[y, 6.8e+79]], $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], 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 -4.1 \cdot 10^{+20} \lor \neg \left(y \leq 6.8 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\end{array}
\end{array}
if y < -4.1e20 or 6.80000000000000063e79 < y Initial program 100.0%
Taylor expanded in t around 0 95.7%
+-commutative95.7%
mul-1-neg95.7%
unsub-neg95.7%
Simplified95.7%
if -4.1e20 < y < 6.80000000000000063e79Initial program 96.3%
Taylor expanded in y around 0 95.1%
Final simplification95.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e+39) (not (<= y 3e+205))) (/ (* 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 <= -2e+39) || !(y <= 3e+205)) {
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 <= (-2d+39)) .or. (.not. (y <= 3d+205))) 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 <= -2e+39) || !(y <= 3e+205)) {
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 <= -2e+39) or not (y <= 3e+205): 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 <= -2e+39) || !(y <= 3e+205)) 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 <= -2e+39) || ~((y <= 3e+205))) 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, -2e+39], N[Not[LessEqual[y, 3e+205]], $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 -2 \cdot 10^{+39} \lor \neg \left(y \leq 3 \cdot 10^{+205}\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.99999999999999988e39 or 2.9999999999999999e205 < y Initial program 100.0%
Taylor expanded in t around 0 97.1%
+-commutative97.1%
mul-1-neg97.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in b around 0 94.1%
div-exp94.1%
*-commutative94.1%
exp-to-pow94.1%
rem-exp-log94.1%
Simplified94.1%
if -1.99999999999999988e39 < y < 2.9999999999999999e205Initial program 96.8%
Taylor expanded in y around 0 91.7%
Final simplification92.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.1e+41) (not (<= y 1.2e+50))) (/ (* x (/ (pow z y) a)) y) (* x (/ (pow a (+ t -1.0)) (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.1e+41) || !(y <= 1.2e+50)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = x * (pow(a, (t + -1.0)) / (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 ((y <= (-6.1d+41)) .or. (.not. (y <= 1.2d+50))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = x * ((a ** (t + (-1.0d0))) / (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 ((y <= -6.1e+41) || !(y <= 1.2e+50)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = x * (Math.pow(a, (t + -1.0)) / (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.1e+41) or not (y <= 1.2e+50): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = x * (math.pow(a, (t + -1.0)) / (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.1e+41) || !(y <= 1.2e+50)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / Float64(y * exp(b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.1e+41) || ~((y <= 1.2e+50))) tmp = (x * ((z ^ y) / a)) / y; else tmp = x * ((a ^ (t + -1.0)) / (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.1e+41], N[Not[LessEqual[y, 1.2e+50]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.1 \cdot 10^{+41} \lor \neg \left(y \leq 1.2 \cdot 10^{+50}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y \cdot e^{b}}\\
\end{array}
\end{array}
if y < -6.09999999999999998e41 or 1.2000000000000001e50 < y Initial program 100.0%
Taylor expanded in t around 0 92.7%
+-commutative92.7%
mul-1-neg92.7%
unsub-neg92.7%
Simplified92.7%
Taylor expanded in b around 0 85.5%
div-exp85.5%
*-commutative85.5%
exp-to-pow85.5%
rem-exp-log85.5%
Simplified85.5%
if -6.09999999999999998e41 < y < 1.2000000000000001e50Initial program 96.2%
associate-/l*97.3%
associate--l+97.3%
exp-sum93.0%
associate-/l*93.0%
*-commutative93.0%
exp-to-pow93.0%
exp-diff81.8%
*-commutative81.8%
exp-to-pow83.2%
sub-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in y around 0 84.4%
exp-to-pow85.8%
sub-neg85.8%
metadata-eval85.8%
Simplified85.8%
Final simplification85.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (/ (pow z y) a)) y)))
(if (<= y -3.4e-6)
t_1
(if (<= y 4.1e-143)
(/ (/ x (* a (exp b))) y)
(if (<= y 1.7e+79) (* 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 <= -3.4e-6) {
tmp = t_1;
} else if (y <= 4.1e-143) {
tmp = (x / (a * exp(b))) / y;
} else if (y <= 1.7e+79) {
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 <= (-3.4d-6)) then
tmp = t_1
else if (y <= 4.1d-143) then
tmp = (x / (a * exp(b))) / y
else if (y <= 1.7d+79) 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 <= -3.4e-6) {
tmp = t_1;
} else if (y <= 4.1e-143) {
tmp = (x / (a * Math.exp(b))) / y;
} else if (y <= 1.7e+79) {
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 <= -3.4e-6: tmp = t_1 elif y <= 4.1e-143: tmp = (x / (a * math.exp(b))) / y elif y <= 1.7e+79: 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(Float64(x * Float64((z ^ y) / a)) / y) tmp = 0.0 if (y <= -3.4e-6) tmp = t_1; elseif (y <= 4.1e-143) tmp = Float64(Float64(x / Float64(a * exp(b))) / y); elseif (y <= 1.7e+79) tmp = Float64(x * Float64((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 <= -3.4e-6) tmp = t_1; elseif (y <= 4.1e-143) tmp = (x / (a * exp(b))) / y; elseif (y <= 1.7e+79) 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[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.4e-6], t$95$1, If[LessEqual[y, 4.1e-143], N[(N[(x / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.7e+79], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $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^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-143}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+79}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.40000000000000006e-6 or 1.70000000000000016e79 < y Initial program 100.0%
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 85.4%
div-exp85.4%
*-commutative85.4%
exp-to-pow85.4%
rem-exp-log85.4%
Simplified85.4%
if -3.40000000000000006e-6 < y < 4.1e-143Initial program 95.5%
Taylor expanded in t around 0 80.2%
+-commutative80.2%
mul-1-neg80.2%
unsub-neg80.2%
Simplified80.2%
Taylor expanded in y around 0 80.2%
exp-neg80.2%
associate-*r/80.3%
*-rgt-identity80.3%
+-commutative80.3%
exp-sum80.2%
rem-exp-log82.0%
Simplified82.0%
if 4.1e-143 < y < 1.70000000000000016e79Initial program 97.3%
associate-/l*99.1%
associate--l+99.1%
exp-sum82.1%
associate-/l*82.1%
*-commutative82.1%
exp-to-pow82.1%
exp-diff69.5%
*-commutative69.5%
exp-to-pow70.2%
sub-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in y around 0 80.2%
exp-to-pow80.8%
sub-neg80.8%
metadata-eval80.8%
Simplified80.8%
Taylor expanded in b around 0 75.2%
Final simplification82.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.1e+59) (not (<= t 1.65e+62))) (* x (/ (pow a (+ t -1.0)) y)) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.1e+59) || !(t <= 1.65e+62)) {
tmp = x * (pow(a, (t + -1.0)) / 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 <= (-3.1d+59)) .or. (.not. (t <= 1.65d+62))) then
tmp = x * ((a ** (t + (-1.0d0))) / 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 <= -3.1e+59) || !(t <= 1.65e+62)) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.1e+59) or not (t <= 1.65e+62): tmp = x * (math.pow(a, (t + -1.0)) / y) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.1e+59) || !(t <= 1.65e+62)) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / 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 <= -3.1e+59) || ~((t <= 1.65e+62))) tmp = x * ((a ^ (t + -1.0)) / y); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.1e+59], N[Not[LessEqual[t, 1.65e+62]], $MachinePrecision]], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+59} \lor \neg \left(t \leq 1.65 \cdot 10^{+62}\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -3.10000000000000015e59 or 1.65e62 < t Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum83.5%
associate-/l*83.5%
*-commutative83.5%
exp-to-pow83.5%
exp-diff62.1%
*-commutative62.1%
exp-to-pow62.1%
sub-neg62.1%
metadata-eval62.1%
Simplified62.1%
Taylor expanded in y around 0 68.1%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
Simplified68.1%
Taylor expanded in b around 0 84.7%
if -3.10000000000000015e59 < t < 1.65e62Initial program 96.0%
Taylor expanded in t around 0 93.5%
+-commutative93.5%
mul-1-neg93.5%
unsub-neg93.5%
Simplified93.5%
Taylor expanded in y around 0 70.3%
exp-neg70.3%
associate-*r/70.3%
*-rgt-identity70.3%
+-commutative70.3%
exp-sum70.3%
rem-exp-log71.8%
associate-/r*62.6%
associate-/r*62.6%
*-commutative62.6%
associate-/r*74.6%
Simplified74.6%
Final simplification78.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.5e+276) (/ x (* a (+ y (* y b)))) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.5e+276) {
tmp = x / (a * (y + (y * b)));
} 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 (y <= (-1.5d+276)) then
tmp = x / (a * (y + (y * b)))
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 (y <= -1.5e+276) {
tmp = x / (a * (y + (y * b)));
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.5e+276: tmp = x / (a * (y + (y * b))) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.5e+276) tmp = Float64(x / Float64(a * Float64(y + Float64(y * b)))); 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 (y <= -1.5e+276) tmp = x / (a * (y + (y * b))); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.5e+276], N[(x / N[(a * N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+276}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if y < -1.49999999999999996e276Initial program 100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 13.9%
exp-neg13.9%
associate-*r/13.9%
*-rgt-identity13.9%
+-commutative13.9%
exp-sum13.9%
rem-exp-log13.9%
associate-/r*13.7%
associate-/r*13.7%
*-commutative13.7%
associate-/r*13.9%
Simplified13.9%
Taylor expanded in b around 0 75.5%
if -1.49999999999999996e276 < y Initial program 97.5%
Taylor expanded in t around 0 80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
Simplified80.3%
Taylor expanded in y around 0 59.8%
exp-neg59.8%
associate-*r/59.8%
*-rgt-identity59.8%
+-commutative59.8%
exp-sum59.9%
rem-exp-log60.7%
associate-/r*53.5%
associate-/r*53.5%
*-commutative53.5%
associate-/r*61.7%
Simplified61.7%
Final simplification62.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.4e+127)
(/ (/ (* x b) a) (- y))
(if (<= b -0.025)
(/ x (+ (* y a) (* b (* (* y a) (+ 1.0 (* b 0.5))))))
(if (<= b -4.8e-242)
(* b (- (/ x (* a (* y b))) (/ x (* y a))))
(/ x (* a (+ y (* b (+ y (* 0.5 (* y b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.4e+127) {
tmp = ((x * b) / a) / -y;
} else if (b <= -0.025) {
tmp = x / ((y * a) + (b * ((y * a) * (1.0 + (b * 0.5)))));
} else if (b <= -4.8e-242) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * (y + (b * (y + (0.5 * (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.4d+127)) then
tmp = ((x * b) / a) / -y
else if (b <= (-0.025d0)) then
tmp = x / ((y * a) + (b * ((y * a) * (1.0d0 + (b * 0.5d0)))))
else if (b <= (-4.8d-242)) then
tmp = b * ((x / (a * (y * b))) - (x / (y * a)))
else
tmp = x / (a * (y + (b * (y + (0.5d0 * (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.4e+127) {
tmp = ((x * b) / a) / -y;
} else if (b <= -0.025) {
tmp = x / ((y * a) + (b * ((y * a) * (1.0 + (b * 0.5)))));
} else if (b <= -4.8e-242) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = x / (a * (y + (b * (y + (0.5 * (y * b))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.4e+127: tmp = ((x * b) / a) / -y elif b <= -0.025: tmp = x / ((y * a) + (b * ((y * a) * (1.0 + (b * 0.5))))) elif b <= -4.8e-242: tmp = b * ((x / (a * (y * b))) - (x / (y * a))) else: tmp = x / (a * (y + (b * (y + (0.5 * (y * b)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.4e+127) tmp = Float64(Float64(Float64(x * b) / a) / Float64(-y)); elseif (b <= -0.025) tmp = Float64(x / Float64(Float64(y * a) + Float64(b * Float64(Float64(y * a) * Float64(1.0 + Float64(b * 0.5)))))); elseif (b <= -4.8e-242) tmp = Float64(b * Float64(Float64(x / Float64(a * Float64(y * b))) - Float64(x / Float64(y * a)))); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(0.5 * Float64(y * b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.4e+127) tmp = ((x * b) / a) / -y; elseif (b <= -0.025) tmp = x / ((y * a) + (b * ((y * a) * (1.0 + (b * 0.5))))); elseif (b <= -4.8e-242) tmp = b * ((x / (a * (y * b))) - (x / (y * a))); else tmp = x / (a * (y + (b * (y + (0.5 * (y * b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.4e+127], N[(N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[b, -0.025], N[(x / N[(N[(y * a), $MachinePrecision] + N[(b * N[(N[(y * a), $MachinePrecision] * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.8e-242], N[(b * N[(N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(0.5 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{+127}:\\
\;\;\;\;\frac{\frac{x \cdot b}{a}}{-y}\\
\mathbf{elif}\;b \leq -0.025:\\
\;\;\;\;\frac{x}{y \cdot a + b \cdot \left(\left(y \cdot a\right) \cdot \left(1 + b \cdot 0.5\right)\right)}\\
\mathbf{elif}\;b \leq -4.8 \cdot 10^{-242}:\\
\;\;\;\;b \cdot \left(\frac{x}{a \cdot \left(y \cdot b\right)} - \frac{x}{y \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + 0.5 \cdot \left(y \cdot b\right)\right)\right)}\\
\end{array}
\end{array}
if b < -2.4000000000000002e127Initial program 100.0%
Taylor expanded in t around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
Taylor expanded in y around 0 85.9%
exp-neg85.9%
associate-*r/85.9%
*-rgt-identity85.9%
+-commutative85.9%
exp-sum85.9%
rem-exp-log85.9%
Simplified85.9%
Taylor expanded in b around 0 58.5%
Taylor expanded in b around inf 58.5%
if -2.4000000000000002e127 < b < -0.025000000000000001Initial program 100.0%
Taylor expanded in t around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
Simplified81.1%
Taylor expanded in y around 0 54.6%
exp-neg54.6%
associate-*r/54.6%
*-rgt-identity54.6%
+-commutative54.6%
exp-sum54.6%
rem-exp-log54.6%
associate-/r*39.1%
associate-/r*39.1%
*-commutative39.1%
associate-/r*54.6%
Simplified54.6%
Taylor expanded in b around 0 27.7%
Taylor expanded in b around 0 24.8%
associate-*r*24.8%
associate-*r*28.5%
*-commutative28.5%
associate-*r*28.5%
associate-*r*32.1%
distribute-lft1-in43.8%
Simplified43.8%
if -0.025000000000000001 < b < -4.8000000000000002e-242Initial program 98.7%
Taylor expanded in t around 0 63.1%
+-commutative63.1%
mul-1-neg63.1%
unsub-neg63.1%
Simplified63.1%
Taylor expanded in y around 0 40.0%
exp-neg40.0%
associate-*r/40.1%
*-rgt-identity40.1%
+-commutative40.1%
exp-sum40.0%
rem-exp-log41.2%
Simplified41.2%
Taylor expanded in b around 0 40.7%
Taylor expanded in b around inf 45.2%
mul-1-neg45.2%
+-commutative45.2%
unsub-neg45.2%
*-commutative45.2%
Simplified45.2%
if -4.8000000000000002e-242 < b Initial program 96.3%
Taylor expanded in t around 0 85.5%
+-commutative85.5%
mul-1-neg85.5%
unsub-neg85.5%
Simplified85.5%
Taylor expanded in y around 0 61.0%
exp-neg61.0%
associate-*r/61.0%
*-rgt-identity61.0%
+-commutative61.0%
exp-sum61.1%
rem-exp-log62.1%
associate-/r*55.8%
associate-/r*55.8%
*-commutative55.8%
associate-/r*63.9%
Simplified63.9%
Taylor expanded in b around 0 48.8%
*-commutative48.8%
Simplified48.8%
Final simplification48.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.65e+126)
(/ (/ (* x b) 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 <= -1.65e+126) {
tmp = ((x * b) / 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 <= (-1.65d+126)) then
tmp = ((x * b) / 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 <= -1.65e+126) {
tmp = ((x * b) / 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 <= -1.65e+126: tmp = ((x * b) / 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 <= -1.65e+126) tmp = Float64(Float64(Float64(x * b) / a) / Float64(-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 <= -1.65e+126) tmp = ((x * b) / 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, -1.65e+126], N[(N[(N[(x * b), $MachinePrecision] / 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 -1.65 \cdot 10^{+126}:\\
\;\;\;\;\frac{\frac{x \cdot b}{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 < -1.65000000000000006e126Initial program 100.0%
Taylor expanded in t around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
Taylor expanded in y around 0 85.9%
exp-neg85.9%
associate-*r/85.9%
*-rgt-identity85.9%
+-commutative85.9%
exp-sum85.9%
rem-exp-log85.9%
Simplified85.9%
Taylor expanded in b around 0 58.5%
Taylor expanded in b around inf 58.5%
if -1.65000000000000006e126 < b Initial program 97.3%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
mul-1-neg79.4%
unsub-neg79.4%
Simplified79.4%
Taylor expanded in y around 0 55.0%
exp-neg55.0%
associate-*r/55.0%
*-rgt-identity55.0%
+-commutative55.0%
exp-sum55.1%
rem-exp-log56.0%
associate-/r*50.3%
associate-/r*50.3%
*-commutative50.3%
associate-/r*57.0%
Simplified57.0%
Taylor expanded in b around 0 49.5%
Taylor expanded in y around 0 51.1%
*-commutative51.1%
Simplified51.1%
Final simplification51.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.4e-258) (* b (- (/ x (* a (* y b))) (/ x (* y a)))) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.4e-258) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = (x / (a + (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 (b <= (-7.4d-258)) then
tmp = b * ((x / (a * (y * b))) - (x / (y * a)))
else
tmp = (x / (a + (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 (b <= -7.4e-258) {
tmp = b * ((x / (a * (y * b))) - (x / (y * a)));
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.4e-258: tmp = b * ((x / (a * (y * b))) - (x / (y * a))) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.4e-258) tmp = Float64(b * Float64(Float64(x / Float64(a * Float64(y * b))) - Float64(x / Float64(y * a)))); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.4e-258) tmp = b * ((x / (a * (y * b))) - (x / (y * a))); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.4e-258], N[(b * N[(N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.4 \cdot 10^{-258}:\\
\;\;\;\;b \cdot \left(\frac{x}{a \cdot \left(y \cdot b\right)} - \frac{x}{y \cdot a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -7.4000000000000001e-258Initial program 99.3%
Taylor expanded in t around 0 75.0%
+-commutative75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in y around 0 54.6%
exp-neg54.6%
associate-*r/54.6%
*-rgt-identity54.6%
+-commutative54.6%
exp-sum54.6%
rem-exp-log55.2%
Simplified55.2%
Taylor expanded in b around 0 39.8%
Taylor expanded in b around inf 42.8%
mul-1-neg42.8%
+-commutative42.8%
unsub-neg42.8%
*-commutative42.8%
Simplified42.8%
if -7.4000000000000001e-258 < b Initial program 96.3%
Taylor expanded in t around 0 85.4%
+-commutative85.4%
mul-1-neg85.4%
unsub-neg85.4%
Simplified85.4%
Taylor expanded in y around 0 61.3%
exp-neg61.3%
associate-*r/61.3%
*-rgt-identity61.3%
+-commutative61.3%
exp-sum61.4%
rem-exp-log62.4%
Simplified62.4%
Taylor expanded in b around 0 42.0%
Final simplification42.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -8.2e+126) (/ (/ (* x b) a) (- y)) (/ x (* a (+ y (* b (+ y (* 0.5 (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.2e+126) {
tmp = ((x * b) / a) / -y;
} else {
tmp = x / (a * (y + (b * (y + (0.5 * (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 <= (-8.2d+126)) then
tmp = ((x * b) / a) / -y
else
tmp = x / (a * (y + (b * (y + (0.5d0 * (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 <= -8.2e+126) {
tmp = ((x * b) / a) / -y;
} else {
tmp = x / (a * (y + (b * (y + (0.5 * (y * b))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.2e+126: tmp = ((x * b) / a) / -y else: tmp = x / (a * (y + (b * (y + (0.5 * (y * b)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.2e+126) tmp = Float64(Float64(Float64(x * b) / a) / Float64(-y)); else tmp = Float64(x / Float64(a * Float64(y + Float64(b * Float64(y + Float64(0.5 * Float64(y * b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8.2e+126) tmp = ((x * b) / a) / -y; else tmp = x / (a * (y + (b * (y + (0.5 * (y * b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.2e+126], N[(N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision] / (-y)), $MachinePrecision], N[(x / N[(a * N[(y + N[(b * N[(y + N[(0.5 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+126}:\\
\;\;\;\;\frac{\frac{x \cdot b}{a}}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + b \cdot \left(y + 0.5 \cdot \left(y \cdot b\right)\right)\right)}\\
\end{array}
\end{array}
if b < -8.2000000000000001e126Initial program 100.0%
Taylor expanded in t around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
Taylor expanded in y around 0 85.9%
exp-neg85.9%
associate-*r/85.9%
*-rgt-identity85.9%
+-commutative85.9%
exp-sum85.9%
rem-exp-log85.9%
Simplified85.9%
Taylor expanded in b around 0 58.5%
Taylor expanded in b around inf 58.5%
if -8.2000000000000001e126 < b Initial program 97.3%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
mul-1-neg79.4%
unsub-neg79.4%
Simplified79.4%
Taylor expanded in y around 0 55.0%
exp-neg55.0%
associate-*r/55.0%
*-rgt-identity55.0%
+-commutative55.0%
exp-sum55.1%
rem-exp-log56.0%
associate-/r*50.3%
associate-/r*50.3%
*-commutative50.3%
associate-/r*57.0%
Simplified57.0%
Taylor expanded in b around 0 45.4%
*-commutative45.4%
Simplified45.4%
Final simplification46.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.2e-93) (* x (/ (- (/ b (- a)) (/ -1.0 a)) y)) (if (<= b 4.2e-48) (/ (* x b) (* y (- a))) (/ (/ x (+ a (* a b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.2e-93) {
tmp = x * (((b / -a) - (-1.0 / a)) / y);
} else if (b <= 4.2e-48) {
tmp = (x * b) / (y * -a);
} else {
tmp = (x / (a + (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 (b <= 2.2d-93) then
tmp = x * (((b / -a) - ((-1.0d0) / a)) / y)
else if (b <= 4.2d-48) then
tmp = (x * b) / (y * -a)
else
tmp = (x / (a + (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 (b <= 2.2e-93) {
tmp = x * (((b / -a) - (-1.0 / a)) / y);
} else if (b <= 4.2e-48) {
tmp = (x * b) / (y * -a);
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.2e-93: tmp = x * (((b / -a) - (-1.0 / a)) / y) elif b <= 4.2e-48: tmp = (x * b) / (y * -a) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.2e-93) tmp = Float64(x * Float64(Float64(Float64(b / Float64(-a)) - Float64(-1.0 / a)) / y)); elseif (b <= 4.2e-48) tmp = Float64(Float64(x * b) / Float64(y * Float64(-a))); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 2.2e-93) tmp = x * (((b / -a) - (-1.0 / a)) / y); elseif (b <= 4.2e-48) tmp = (x * b) / (y * -a); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.2e-93], N[(x * N[(N[(N[(b / (-a)), $MachinePrecision] - N[(-1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e-48], N[(N[(x * b), $MachinePrecision] / N[(y * (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.2 \cdot 10^{-93}:\\
\;\;\;\;x \cdot \frac{\frac{b}{-a} - \frac{-1}{a}}{y}\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{x \cdot b}{y \cdot \left(-a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < 2.19999999999999996e-93Initial program 97.1%
Taylor expanded in t around 0 76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
Taylor expanded in y around 0 51.7%
exp-neg51.7%
associate-*r/51.7%
*-rgt-identity51.7%
+-commutative51.7%
exp-sum51.6%
rem-exp-log52.9%
Simplified52.9%
Taylor expanded in b around 0 42.5%
Taylor expanded in x around -inf 42.4%
mul-1-neg42.4%
associate-/l*44.3%
distribute-rgt-neg-in44.3%
sub-neg44.3%
distribute-neg-frac44.3%
metadata-eval44.3%
Simplified44.3%
if 2.19999999999999996e-93 < b < 4.19999999999999977e-48Initial program 91.3%
Taylor expanded in t around 0 82.7%
+-commutative82.7%
mul-1-neg82.7%
unsub-neg82.7%
Simplified82.7%
Taylor expanded in y around 0 13.8%
exp-neg13.8%
associate-*r/13.8%
*-rgt-identity13.8%
+-commutative13.8%
exp-sum13.8%
rem-exp-log13.8%
Simplified13.8%
Taylor expanded in b around 0 13.8%
Taylor expanded in b around inf 55.9%
associate-*r/55.9%
mul-1-neg55.9%
*-commutative55.9%
Simplified55.9%
if 4.19999999999999977e-48 < b Initial program 99.8%
Taylor expanded in t around 0 92.7%
+-commutative92.7%
mul-1-neg92.7%
unsub-neg92.7%
Simplified92.7%
Taylor expanded in y around 0 82.7%
exp-neg82.7%
associate-*r/82.7%
*-rgt-identity82.7%
+-commutative82.7%
exp-sum82.9%
rem-exp-log82.9%
Simplified82.9%
Taylor expanded in b around 0 40.3%
Final simplification43.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.65e+126) (/ (* x (/ b (- 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 <= -1.65e+126) {
tmp = (x * (b / -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 <= (-1.65d+126)) then
tmp = (x * (b / -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 <= -1.65e+126) {
tmp = (x * (b / -a)) / y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.65e+126: tmp = (x * (b / -a)) / y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.65e+126) tmp = Float64(Float64(x * Float64(b / Float64(-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 <= -1.65e+126) tmp = (x * (b / -a)) / y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.65e+126], N[(N[(x * N[(b / (-a)), $MachinePrecision]), $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 -1.65 \cdot 10^{+126}:\\
\;\;\;\;\frac{x \cdot \frac{b}{-a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.65000000000000006e126Initial program 100.0%
Taylor expanded in t around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
Taylor expanded in y around 0 85.9%
exp-neg85.9%
associate-*r/85.9%
*-rgt-identity85.9%
+-commutative85.9%
exp-sum85.9%
rem-exp-log85.9%
Simplified85.9%
Taylor expanded in b around 0 58.5%
Taylor expanded in b around inf 58.5%
mul-1-neg58.5%
*-commutative58.5%
associate-/l*58.1%
distribute-rgt-neg-out58.1%
distribute-neg-frac258.1%
Simplified58.1%
if -1.65000000000000006e126 < b Initial program 97.3%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
mul-1-neg79.4%
unsub-neg79.4%
Simplified79.4%
Taylor expanded in y around 0 55.0%
exp-neg55.0%
associate-*r/55.0%
*-rgt-identity55.0%
+-commutative55.0%
exp-sum55.1%
rem-exp-log56.0%
associate-/r*50.3%
associate-/r*50.3%
*-commutative50.3%
associate-/r*57.0%
Simplified57.0%
Taylor expanded in b around 0 39.8%
Final simplification41.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.65e+126) (/ (/ (* x b) 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 <= -1.65e+126) {
tmp = ((x * b) / 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 <= (-1.65d+126)) then
tmp = ((x * b) / 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 <= -1.65e+126) {
tmp = ((x * b) / a) / -y;
} else {
tmp = x / (a * (y + (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.65e+126: tmp = ((x * b) / a) / -y else: tmp = x / (a * (y + (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.65e+126) tmp = Float64(Float64(Float64(x * b) / a) / Float64(-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.65e+126) tmp = ((x * b) / a) / -y; else tmp = x / (a * (y + (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.65e+126], N[(N[(N[(x * b), $MachinePrecision] / 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 -1.65 \cdot 10^{+126}:\\
\;\;\;\;\frac{\frac{x \cdot b}{a}}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y + y \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.65000000000000006e126Initial program 100.0%
Taylor expanded in t around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
Taylor expanded in y around 0 85.9%
exp-neg85.9%
associate-*r/85.9%
*-rgt-identity85.9%
+-commutative85.9%
exp-sum85.9%
rem-exp-log85.9%
Simplified85.9%
Taylor expanded in b around 0 58.5%
Taylor expanded in b around inf 58.5%
if -1.65000000000000006e126 < b Initial program 97.3%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
mul-1-neg79.4%
unsub-neg79.4%
Simplified79.4%
Taylor expanded in y around 0 55.0%
exp-neg55.0%
associate-*r/55.0%
*-rgt-identity55.0%
+-commutative55.0%
exp-sum55.1%
rem-exp-log56.0%
associate-/r*50.3%
associate-/r*50.3%
*-commutative50.3%
associate-/r*57.0%
Simplified57.0%
Taylor expanded in b around 0 39.8%
Final simplification41.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.9e+126) (/ (/ (* x b) a) (- y)) (/ (/ x (+ a (* a b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.9e+126) {
tmp = ((x * b) / a) / -y;
} else {
tmp = (x / (a + (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 (b <= (-1.9d+126)) then
tmp = ((x * b) / a) / -y
else
tmp = (x / (a + (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 (b <= -1.9e+126) {
tmp = ((x * b) / a) / -y;
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.9e+126: tmp = ((x * b) / a) / -y else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.9e+126) tmp = Float64(Float64(Float64(x * b) / a) / Float64(-y)); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.9e+126) tmp = ((x * b) / a) / -y; else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.9e+126], N[(N[(N[(x * b), $MachinePrecision] / a), $MachinePrecision] / (-y)), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{+126}:\\
\;\;\;\;\frac{\frac{x \cdot b}{a}}{-y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -1.90000000000000008e126Initial program 100.0%
Taylor expanded in t around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
Taylor expanded in y around 0 85.9%
exp-neg85.9%
associate-*r/85.9%
*-rgt-identity85.9%
+-commutative85.9%
exp-sum85.9%
rem-exp-log85.9%
Simplified85.9%
Taylor expanded in b around 0 58.5%
Taylor expanded in b around inf 58.5%
if -1.90000000000000008e126 < b Initial program 97.3%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
mul-1-neg79.4%
unsub-neg79.4%
Simplified79.4%
Taylor expanded in y around 0 55.0%
exp-neg55.0%
associate-*r/55.0%
*-rgt-identity55.0%
+-commutative55.0%
exp-sum55.1%
rem-exp-log56.0%
Simplified56.0%
Taylor expanded in b around 0 40.0%
Final simplification42.1%
(FPCore (x y z t a b) :precision binary64 (if (<= x 5.2e-232) (/ (* b (/ 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 (x <= 5.2e-232) {
tmp = (b * (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 (x <= 5.2d-232) then
tmp = (b * (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 (x <= 5.2e-232) {
tmp = (b * (x / -a)) / y;
} else {
tmp = x * (1.0 / (y * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 5.2e-232: tmp = (b * (x / -a)) / y else: tmp = x * (1.0 / (y * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 5.2e-232) tmp = Float64(Float64(b * Float64(x / Float64(-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 (x <= 5.2e-232) tmp = (b * (x / -a)) / y; else tmp = x * (1.0 / (y * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 5.2e-232], N[(N[(b * N[(x / (-a)), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.2 \cdot 10^{-232}:\\
\;\;\;\;\frac{b \cdot \frac{x}{-a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\end{array}
\end{array}
if x < 5.19999999999999992e-232Initial program 98.4%
Taylor expanded in t around 0 80.7%
+-commutative80.7%
mul-1-neg80.7%
unsub-neg80.7%
Simplified80.7%
Taylor expanded in y around 0 58.3%
exp-neg58.3%
associate-*r/58.3%
*-rgt-identity58.3%
+-commutative58.3%
exp-sum58.4%
rem-exp-log59.2%
Simplified59.2%
Taylor expanded in b around 0 28.2%
Taylor expanded in b around inf 27.2%
associate-*r/27.2%
mul-1-neg27.2%
distribute-rgt-neg-in27.2%
associate-*r/28.1%
Simplified28.1%
if 5.19999999999999992e-232 < x Initial program 96.8%
associate-/l*98.2%
associate--l+98.2%
exp-sum83.6%
associate-/l*82.8%
*-commutative82.8%
exp-to-pow82.8%
exp-diff72.4%
*-commutative72.4%
exp-to-pow73.4%
sub-neg73.4%
metadata-eval73.4%
Simplified73.4%
Taylor expanded in y around 0 68.0%
exp-to-pow69.0%
sub-neg69.0%
metadata-eval69.0%
Simplified69.0%
Taylor expanded in b around 0 58.7%
Taylor expanded in t around 0 37.7%
Final simplification32.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a 3e-208) (/ (/ 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 <= 3e-208) {
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 <= 3d-208) 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 <= 3e-208) {
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 <= 3e-208: 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 <= 3e-208) 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 <= 3e-208) 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, 3e-208], 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 3 \cdot 10^{-208}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\end{array}
\end{array}
if a < 2.99999999999999986e-208Initial program 99.5%
Taylor expanded in t around 0 81.7%
+-commutative81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
Taylor expanded in y around 0 61.9%
exp-neg61.9%
associate-*r/61.9%
*-rgt-identity61.9%
+-commutative61.9%
exp-sum61.9%
rem-exp-log62.4%
Simplified62.4%
Taylor expanded in b around 0 40.3%
if 2.99999999999999986e-208 < a Initial program 97.2%
associate-/l*98.8%
associate--l+98.8%
exp-sum82.8%
associate-/l*80.9%
*-commutative80.9%
exp-to-pow80.9%
exp-diff69.6%
*-commutative69.6%
exp-to-pow70.7%
sub-neg70.7%
metadata-eval70.7%
Simplified70.7%
Taylor expanded in y around 0 67.7%
exp-to-pow68.8%
sub-neg68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in b around 0 59.4%
Taylor expanded in t around 0 35.4%
Final simplification36.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a 2.5e-208) (/ (/ 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.5e-208) {
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.5d-208) 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.5e-208) {
tmp = (x / a) / y;
} else {
tmp = x / (y * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 2.5e-208: 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.5e-208) 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.5e-208) 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.5e-208], 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.5 \cdot 10^{-208}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\end{array}
\end{array}
if a < 2.49999999999999981e-208Initial program 99.5%
Taylor expanded in t around 0 81.7%
+-commutative81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
Taylor expanded in y around 0 61.9%
exp-neg61.9%
associate-*r/61.9%
*-rgt-identity61.9%
+-commutative61.9%
exp-sum61.9%
rem-exp-log62.4%
Simplified62.4%
Taylor expanded in b around 0 40.3%
if 2.49999999999999981e-208 < a Initial program 97.2%
Taylor expanded in t around 0 80.7%
+-commutative80.7%
mul-1-neg80.7%
unsub-neg80.7%
Simplified80.7%
Taylor expanded in y around 0 57.7%
exp-neg57.7%
associate-*r/57.7%
*-rgt-identity57.7%
+-commutative57.7%
exp-sum57.7%
rem-exp-log58.6%
associate-/r*52.5%
associate-/r*52.5%
*-commutative52.5%
associate-/r*61.5%
Simplified61.5%
Taylor expanded in b around 0 35.4%
*-commutative35.4%
Simplified35.4%
Final simplification36.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 97.6%
Taylor expanded in t around 0 80.9%
+-commutative80.9%
mul-1-neg80.9%
unsub-neg80.9%
Simplified80.9%
Taylor expanded in y around 0 58.4%
exp-neg58.4%
associate-*r/58.4%
*-rgt-identity58.4%
+-commutative58.4%
exp-sum58.4%
rem-exp-log59.3%
associate-/r*52.2%
associate-/r*52.2%
*-commutative52.2%
associate-/r*60.2%
Simplified60.2%
Taylor expanded in b around 0 34.0%
*-commutative34.0%
Simplified34.0%
Final simplification34.0%
(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 2024055
(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))