
(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 21 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.5%
Final simplification98.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -4e+125) (not (<= (+ t -1.0) -1.0))) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y) (/ (* x (exp (- (- (* y (log z)) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -4e+125) || !((t + -1.0) <= -1.0)) {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
} else {
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (((t + (-1.0d0)) <= (-4d+125)) .or. (.not. ((t + (-1.0d0)) <= (-1.0d0)))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
else
tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -4e+125) || !((t + -1.0) <= -1.0)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.exp((((y * Math.log(z)) - Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -4e+125) or not ((t + -1.0) <= -1.0): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y else: tmp = (x * math.exp((((y * math.log(z)) - math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -4e+125) || !(Float64(t + -1.0) <= -1.0)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((t + -1.0) <= -4e+125) || ~(((t + -1.0) <= -1.0))) tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; else tmp = (x * exp((((y * log(z)) - log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -4e+125], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -1.0]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -4 \cdot 10^{+125} \lor \neg \left(t + -1 \leq -1\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -3.9999999999999997e125 or -1 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 93.7%
if -3.9999999999999997e125 < (-.f64 t 1) < -1Initial program 97.3%
Taylor expanded in t around 0 96.6%
mul-1-neg96.6%
unsub-neg96.6%
Simplified96.6%
Final simplification95.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (pow a (+ t -1.0))) y)))
(if (<= (+ t -1.0) -5e+55)
t_1
(if (<= (+ t -1.0) -1.0000000000001)
(/ (/ (* x (pow z y)) a) y)
(if (<= (+ t -1.0) -0.99)
(* (/ (pow z y) (* a (exp b))) (/ x y))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * pow(a, (t + -1.0))) / y;
double tmp;
if ((t + -1.0) <= -5e+55) {
tmp = t_1;
} else if ((t + -1.0) <= -1.0000000000001) {
tmp = ((x * pow(z, y)) / a) / y;
} else if ((t + -1.0) <= -0.99) {
tmp = (pow(z, y) / (a * exp(b))) * (x / 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 * (a ** (t + (-1.0d0)))) / y
if ((t + (-1.0d0)) <= (-5d+55)) then
tmp = t_1
else if ((t + (-1.0d0)) <= (-1.0000000000001d0)) then
tmp = ((x * (z ** y)) / a) / y
else if ((t + (-1.0d0)) <= (-0.99d0)) then
tmp = ((z ** y) / (a * exp(b))) * (x / 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(a, (t + -1.0))) / y;
double tmp;
if ((t + -1.0) <= -5e+55) {
tmp = t_1;
} else if ((t + -1.0) <= -1.0000000000001) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else if ((t + -1.0) <= -0.99) {
tmp = (Math.pow(z, y) / (a * Math.exp(b))) * (x / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * math.pow(a, (t + -1.0))) / y tmp = 0 if (t + -1.0) <= -5e+55: tmp = t_1 elif (t + -1.0) <= -1.0000000000001: tmp = ((x * math.pow(z, y)) / a) / y elif (t + -1.0) <= -0.99: tmp = (math.pow(z, y) / (a * math.exp(b))) * (x / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) tmp = 0.0 if (Float64(t + -1.0) <= -5e+55) tmp = t_1; elseif (Float64(t + -1.0) <= -1.0000000000001) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); elseif (Float64(t + -1.0) <= -0.99) tmp = Float64(Float64((z ^ y) / Float64(a * exp(b))) * Float64(x / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x * (a ^ (t + -1.0))) / y; tmp = 0.0; if ((t + -1.0) <= -5e+55) tmp = t_1; elseif ((t + -1.0) <= -1.0000000000001) tmp = ((x * (z ^ y)) / a) / y; elseif ((t + -1.0) <= -0.99) tmp = ((z ^ y) / (a * exp(b))) * (x / 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[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[N[(t + -1.0), $MachinePrecision], -5e+55], t$95$1, If[LessEqual[N[(t + -1.0), $MachinePrecision], -1.0000000000001], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[N[(t + -1.0), $MachinePrecision], -0.99], N[(N[(N[Power[z, y], $MachinePrecision] / N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t + -1 \leq -5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t + -1 \leq -1.0000000000001:\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{elif}\;t + -1 \leq -0.99:\\
\;\;\;\;\frac{{z}^{y}}{a \cdot e^{b}} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (-.f64 t 1) < -5.00000000000000046e55 or -0.98999999999999999 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 93.4%
Taylor expanded in b around 0 90.2%
if -5.00000000000000046e55 < (-.f64 t 1) < -1.0000000000000999Initial program 100.0%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in b around 0 93.4%
*-commutative93.4%
div-exp93.4%
*-commutative93.4%
exp-to-pow93.4%
rem-exp-log93.4%
associate-*r/93.4%
Simplified93.4%
if -1.0000000000000999 < (-.f64 t 1) < -0.98999999999999999Initial program 96.7%
associate-*l/89.9%
*-commutative89.9%
Simplified83.5%
Taylor expanded in t around 0 83.5%
Final simplification87.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3e+132) (not (<= y 14600000000.0))) (/ (/ (* x (pow z y)) a) y) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3e+132) || !(y <= 14600000000.0)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3d+132)) .or. (.not. (y <= 14600000000.0d0))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3e+132) || !(y <= 14600000000.0)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3e+132) or not (y <= 14600000000.0): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3e+132) || !(y <= 14600000000.0)) tmp = Float64(Float64(Float64(x * (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 <= -3e+132) || ~((y <= 14600000000.0))) tmp = ((x * (z ^ y)) / a) / y; else tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3e+132], N[Not[LessEqual[y, 14600000000.0]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $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 -3 \cdot 10^{+132} \lor \neg \left(y \leq 14600000000\right):\\
\;\;\;\;\frac{\frac{x \cdot {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 < -2.9999999999999998e132 or 1.46e10 < y Initial program 100.0%
Taylor expanded in t around 0 92.4%
mul-1-neg92.4%
unsub-neg92.4%
Simplified92.4%
Taylor expanded in b around 0 85.8%
*-commutative85.8%
div-exp85.8%
*-commutative85.8%
exp-to-pow85.8%
rem-exp-log85.8%
associate-*r/85.8%
Simplified85.8%
if -2.9999999999999998e132 < y < 1.46e10Initial program 97.4%
Taylor expanded in y around 0 94.8%
Final simplification91.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.5e+129) (not (<= y 28500000.0))) (/ (/ (* x (pow z y)) a) y) (/ (* x (/ (pow a (+ t -1.0)) (exp b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.5e+129) || !(y <= 28500000.0)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = (x * (pow(a, (t + -1.0)) / exp(b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-8.5d+129)) .or. (.not. (y <= 28500000.0d0))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = (x * ((a ** (t + (-1.0d0))) / exp(b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.5e+129) || !(y <= 28500000.0)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = (x * (Math.pow(a, (t + -1.0)) / Math.exp(b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.5e+129) or not (y <= 28500000.0): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = (x * (math.pow(a, (t + -1.0)) / math.exp(b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.5e+129) || !(y <= 28500000.0)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(Float64(x * Float64((a ^ Float64(t + -1.0)) / exp(b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.5e+129) || ~((y <= 28500000.0))) tmp = ((x * (z ^ y)) / a) / y; else tmp = (x * ((a ^ (t + -1.0)) / exp(b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.5e+129], N[Not[LessEqual[y, 28500000.0]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+129} \lor \neg \left(y \leq 28500000\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\\
\end{array}
\end{array}
if y < -8.5000000000000001e129 or 2.85e7 < y Initial program 100.0%
Taylor expanded in t around 0 92.4%
mul-1-neg92.4%
unsub-neg92.4%
Simplified92.4%
Taylor expanded in b around 0 85.8%
*-commutative85.8%
div-exp85.8%
*-commutative85.8%
exp-to-pow85.8%
rem-exp-log85.8%
associate-*r/85.8%
Simplified85.8%
if -8.5000000000000001e129 < y < 2.85e7Initial program 97.4%
Taylor expanded in y around 0 94.8%
*-commutative94.8%
exp-diff87.6%
sub-neg87.6%
metadata-eval87.6%
*-commutative87.6%
exp-to-pow88.3%
Simplified88.3%
Final simplification87.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (/ (* x (pow z y)) a) y))
(t_2 (/ (* x (pow a (+ t -1.0))) y))
(t_3 (/ x (* a (* y (exp b))))))
(if (<= t -1.8e+57)
t_2
(if (<= t -3.4e-19)
t_1
(if (<= t -6.4e-85)
t_3
(if (<= t 2.8e-268) t_1 (if (<= t 0.0145) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * pow(z, y)) / a) / y;
double t_2 = (x * pow(a, (t + -1.0))) / y;
double t_3 = x / (a * (y * exp(b)));
double tmp;
if (t <= -1.8e+57) {
tmp = t_2;
} else if (t <= -3.4e-19) {
tmp = t_1;
} else if (t <= -6.4e-85) {
tmp = t_3;
} else if (t <= 2.8e-268) {
tmp = t_1;
} else if (t <= 0.0145) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = ((x * (z ** y)) / a) / y
t_2 = (x * (a ** (t + (-1.0d0)))) / y
t_3 = x / (a * (y * exp(b)))
if (t <= (-1.8d+57)) then
tmp = t_2
else if (t <= (-3.4d-19)) then
tmp = t_1
else if (t <= (-6.4d-85)) then
tmp = t_3
else if (t <= 2.8d-268) then
tmp = t_1
else if (t <= 0.0145d0) then
tmp = t_3
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 = ((x * Math.pow(z, y)) / a) / y;
double t_2 = (x * Math.pow(a, (t + -1.0))) / y;
double t_3 = x / (a * (y * Math.exp(b)));
double tmp;
if (t <= -1.8e+57) {
tmp = t_2;
} else if (t <= -3.4e-19) {
tmp = t_1;
} else if (t <= -6.4e-85) {
tmp = t_3;
} else if (t <= 2.8e-268) {
tmp = t_1;
} else if (t <= 0.0145) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * math.pow(z, y)) / a) / y t_2 = (x * math.pow(a, (t + -1.0))) / y t_3 = x / (a * (y * math.exp(b))) tmp = 0 if t <= -1.8e+57: tmp = t_2 elif t <= -3.4e-19: tmp = t_1 elif t <= -6.4e-85: tmp = t_3 elif t <= 2.8e-268: tmp = t_1 elif t <= 0.0145: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * (z ^ y)) / a) / y) t_2 = Float64(Float64(x * (a ^ Float64(t + -1.0))) / y) t_3 = Float64(x / Float64(a * Float64(y * exp(b)))) tmp = 0.0 if (t <= -1.8e+57) tmp = t_2; elseif (t <= -3.4e-19) tmp = t_1; elseif (t <= -6.4e-85) tmp = t_3; elseif (t <= 2.8e-268) tmp = t_1; elseif (t <= 0.0145) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * (z ^ y)) / a) / y; t_2 = (x * (a ^ (t + -1.0))) / y; t_3 = x / (a * (y * exp(b))); tmp = 0.0; if (t <= -1.8e+57) tmp = t_2; elseif (t <= -3.4e-19) tmp = t_1; elseif (t <= -6.4e-85) tmp = t_3; elseif (t <= 2.8e-268) tmp = t_1; elseif (t <= 0.0145) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e+57], t$95$2, If[LessEqual[t, -3.4e-19], t$95$1, If[LessEqual[t, -6.4e-85], t$95$3, If[LessEqual[t, 2.8e-268], t$95$1, If[LessEqual[t, 0.0145], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
t_2 := \frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
t_3 := \frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+57}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.4 \cdot 10^{-85}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-268}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 0.0145:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.8000000000000001e57 or 0.0145000000000000007 < t Initial program 100.0%
Taylor expanded in y around 0 93.4%
Taylor expanded in b around 0 90.2%
if -1.8000000000000001e57 < t < -3.4000000000000002e-19 or -6.40000000000000054e-85 < t < 2.80000000000000015e-268Initial program 97.9%
Taylor expanded in t around 0 97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in b around 0 80.5%
*-commutative80.5%
div-exp80.5%
*-commutative80.5%
exp-to-pow80.5%
rem-exp-log81.3%
associate-*r/81.3%
Simplified81.3%
if -3.4000000000000002e-19 < t < -6.40000000000000054e-85 or 2.80000000000000015e-268 < t < 0.0145000000000000007Initial program 96.2%
associate-*l/91.0%
*-commutative91.0%
Simplified87.2%
Taylor expanded in t around 0 88.9%
Taylor expanded in y around 0 84.5%
Final simplification86.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -150.0) (not (<= t 0.0145))) (/ (* 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 <= -150.0) || !(t <= 0.0145)) {
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 <= (-150.0d0)) .or. (.not. (t <= 0.0145d0))) 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 <= -150.0) || !(t <= 0.0145)) {
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 <= -150.0) or not (t <= 0.0145): 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 <= -150.0) || !(t <= 0.0145)) tmp = Float64(Float64(x * (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 <= -150.0) || ~((t <= 0.0145))) 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, -150.0], N[Not[LessEqual[t, 0.0145]], $MachinePrecision]], N[(N[(x * N[Power[a, N[(t + -1.0), $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}\;t \leq -150 \lor \neg \left(t \leq 0.0145\right):\\
\;\;\;\;\frac{x \cdot {a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -150 or 0.0145000000000000007 < t Initial program 100.0%
Taylor expanded in y around 0 91.4%
Taylor expanded in b around 0 89.1%
if -150 < t < 0.0145000000000000007Initial program 97.0%
associate-*l/90.6%
*-commutative90.6%
Simplified80.8%
Taylor expanded in t around 0 82.4%
Taylor expanded in y around 0 68.5%
Final simplification78.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z 3.3e+84) (/ x (* a (* y (exp b)))) (/ (/ (/ x a) (exp b)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 3.3e+84) {
tmp = x / (a * (y * exp(b)));
} 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 (z <= 3.3d+84) then
tmp = x / (a * (y * exp(b)))
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 (z <= 3.3e+84) {
tmp = x / (a * (y * Math.exp(b)));
} else {
tmp = ((x / a) / Math.exp(b)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 3.3e+84: tmp = x / (a * (y * math.exp(b))) else: tmp = ((x / a) / math.exp(b)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 3.3e+84) tmp = Float64(x / Float64(a * Float64(y * exp(b)))); else tmp = Float64(Float64(Float64(x / a) / exp(b)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 3.3e+84) tmp = x / (a * (y * exp(b))); else tmp = ((x / a) / exp(b)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 3.3e+84], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{x}{a}}{e^{b}}}{y}\\
\end{array}
\end{array}
if z < 3.30000000000000017e84Initial program 97.9%
associate-*l/89.3%
*-commutative89.3%
Simplified70.1%
Taylor expanded in t around 0 71.0%
Taylor expanded in y around 0 63.1%
if 3.30000000000000017e84 < z Initial program 99.7%
Taylor expanded in t around 0 78.8%
mul-1-neg78.8%
unsub-neg78.8%
Simplified78.8%
Taylor expanded in y around 0 54.1%
exp-neg54.1%
associate-*l/54.1%
*-lft-identity54.1%
exp-sum54.1%
rem-exp-log54.4%
*-commutative54.4%
associate-/r*53.1%
Simplified53.1%
Final simplification60.0%
(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.5%
associate-*l/89.8%
*-commutative89.8%
Simplified71.1%
Taylor expanded in t around 0 68.9%
Taylor expanded in y around 0 58.2%
Final simplification58.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (/ x y) (/ x (/ y b))) a)))
(if (<= b -4e+87)
t_1
(if (<= b -6.2e-19)
(/ (- (* x (/ a x)) (* a b)) (* y (* a (/ a x))))
(if (<= b 1.1e-243)
t_1
(if (<= b 9.2e-206)
(/ x (* y (* a b)))
(if (<= b 3.9e-97)
(/ (/ (- 1.0 b) (/ a x)) y)
(/ x (* y (+ a (* a b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x / y) - (x / (y / b))) / a;
double tmp;
if (b <= -4e+87) {
tmp = t_1;
} else if (b <= -6.2e-19) {
tmp = ((x * (a / x)) - (a * b)) / (y * (a * (a / x)));
} else if (b <= 1.1e-243) {
tmp = t_1;
} else if (b <= 9.2e-206) {
tmp = x / (y * (a * b));
} else if (b <= 3.9e-97) {
tmp = ((1.0 - b) / (a / x)) / y;
} else {
tmp = x / (y * (a + (a * 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) - (x / (y / b))) / a
if (b <= (-4d+87)) then
tmp = t_1
else if (b <= (-6.2d-19)) then
tmp = ((x * (a / x)) - (a * b)) / (y * (a * (a / x)))
else if (b <= 1.1d-243) then
tmp = t_1
else if (b <= 9.2d-206) then
tmp = x / (y * (a * b))
else if (b <= 3.9d-97) then
tmp = ((1.0d0 - b) / (a / x)) / y
else
tmp = x / (y * (a + (a * 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) - (x / (y / b))) / a;
double tmp;
if (b <= -4e+87) {
tmp = t_1;
} else if (b <= -6.2e-19) {
tmp = ((x * (a / x)) - (a * b)) / (y * (a * (a / x)));
} else if (b <= 1.1e-243) {
tmp = t_1;
} else if (b <= 9.2e-206) {
tmp = x / (y * (a * b));
} else if (b <= 3.9e-97) {
tmp = ((1.0 - b) / (a / x)) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x / y) - (x / (y / b))) / a tmp = 0 if b <= -4e+87: tmp = t_1 elif b <= -6.2e-19: tmp = ((x * (a / x)) - (a * b)) / (y * (a * (a / x))) elif b <= 1.1e-243: tmp = t_1 elif b <= 9.2e-206: tmp = x / (y * (a * b)) elif b <= 3.9e-97: tmp = ((1.0 - b) / (a / x)) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x / y) - Float64(x / Float64(y / b))) / a) tmp = 0.0 if (b <= -4e+87) tmp = t_1; elseif (b <= -6.2e-19) tmp = Float64(Float64(Float64(x * Float64(a / x)) - Float64(a * b)) / Float64(y * Float64(a * Float64(a / x)))); elseif (b <= 1.1e-243) tmp = t_1; elseif (b <= 9.2e-206) tmp = Float64(x / Float64(y * Float64(a * b))); elseif (b <= 3.9e-97) tmp = Float64(Float64(Float64(1.0 - b) / Float64(a / x)) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x / y) - (x / (y / b))) / a; tmp = 0.0; if (b <= -4e+87) tmp = t_1; elseif (b <= -6.2e-19) tmp = ((x * (a / x)) - (a * b)) / (y * (a * (a / x))); elseif (b <= 1.1e-243) tmp = t_1; elseif (b <= 9.2e-206) tmp = x / (y * (a * b)); elseif (b <= 3.9e-97) tmp = ((1.0 - b) / (a / x)) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x / y), $MachinePrecision] - N[(x / N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[b, -4e+87], t$95$1, If[LessEqual[b, -6.2e-19], N[(N[(N[(x * N[(a / x), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision] / N[(y * N[(a * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e-243], t$95$1, If[LessEqual[b, 9.2e-206], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.9e-97], N[(N[(N[(1.0 - b), $MachinePrecision] / N[(a / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y} - \frac{x}{\frac{y}{b}}}{a}\\
\mathbf{if}\;b \leq -4 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{x \cdot \frac{a}{x} - a \cdot b}{y \cdot \left(a \cdot \frac{a}{x}\right)}\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-243}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{-206}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\mathbf{elif}\;b \leq 3.9 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{1 - b}{\frac{a}{x}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.9999999999999998e87 or -6.1999999999999998e-19 < b < 1.1e-243Initial program 98.5%
associate-*l/90.8%
*-commutative90.8%
Simplified72.4%
Taylor expanded in t around 0 71.1%
Taylor expanded in y around 0 58.0%
Taylor expanded in b around 0 42.8%
Taylor expanded in a around 0 45.6%
+-commutative45.6%
mul-1-neg45.6%
unsub-neg45.6%
*-commutative45.6%
associate-/l*47.3%
Simplified47.3%
if -3.9999999999999998e87 < b < -6.1999999999999998e-19Initial program 96.6%
associate-*l/96.1%
*-commutative96.1%
Simplified71.4%
Taylor expanded in t around 0 64.9%
Taylor expanded in y around 0 65.4%
Taylor expanded in b around 0 17.2%
add-sqr-sqrt1.9%
fma-def1.9%
mul-1-neg1.9%
*-un-lft-identity1.9%
times-frac1.9%
*-commutative1.9%
associate-/r*8.6%
times-frac8.6%
clear-num8.6%
div-inv8.6%
*-un-lft-identity8.6%
fma-neg8.6%
add-sqr-sqrt27.3%
associate-/r*27.2%
div-sub27.2%
div-inv27.2%
Applied egg-rr40.5%
*-rgt-identity40.5%
*-commutative40.5%
Simplified40.5%
if 1.1e-243 < b < 9.2e-206Initial program 100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified80.0%
Taylor expanded in t around 0 51.8%
Taylor expanded in y around 0 14.0%
Taylor expanded in b around 0 14.0%
distribute-lft-out14.0%
*-commutative14.0%
Simplified14.0%
Taylor expanded in b around inf 61.4%
associate-*r*61.2%
*-commutative61.2%
associate-*r*70.9%
Simplified70.9%
if 9.2e-206 < b < 3.8999999999999998e-97Initial program 99.0%
Taylor expanded in t around 0 68.2%
mul-1-neg68.2%
unsub-neg68.2%
Simplified68.2%
Taylor expanded in y around 0 41.5%
exp-neg41.5%
associate-*l/41.5%
*-lft-identity41.5%
exp-sum41.5%
rem-exp-log42.4%
*-commutative42.4%
associate-/r*42.4%
Simplified42.4%
Taylor expanded in b around 0 42.4%
+-commutative42.4%
mul-1-neg42.4%
unsub-neg42.4%
associate-/l*42.3%
Simplified42.3%
clear-num46.7%
sub-div46.7%
Applied egg-rr46.7%
if 3.8999999999999998e-97 < b Initial program 98.7%
associate-*l/87.2%
*-commutative87.2%
Simplified66.3%
Taylor expanded in t around 0 70.2%
Taylor expanded in y around 0 70.7%
Taylor expanded in b around 0 35.3%
Final simplification43.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.25e+53)
(+ (/ (- x (* x b)) (* y a)) (* (/ x y) (/ (* b b) a)))
(if (<= b 1.4e-242)
(/ (- 1.0 b) (* y (/ a x)))
(if (<= b 3.7e-209)
(/ x (* y (* a b)))
(if (<= b 1e-95)
(/ (/ (- 1.0 b) (/ a x)) y)
(/ x (* y (+ a (* a b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.25e+53) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else if (b <= 1.4e-242) {
tmp = (1.0 - b) / (y * (a / x));
} else if (b <= 3.7e-209) {
tmp = x / (y * (a * b));
} else if (b <= 1e-95) {
tmp = ((1.0 - b) / (a / x)) / y;
} else {
tmp = x / (y * (a + (a * 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+53)) then
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a))
else if (b <= 1.4d-242) then
tmp = (1.0d0 - b) / (y * (a / x))
else if (b <= 3.7d-209) then
tmp = x / (y * (a * b))
else if (b <= 1d-95) then
tmp = ((1.0d0 - b) / (a / x)) / y
else
tmp = x / (y * (a + (a * 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+53) {
tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a));
} else if (b <= 1.4e-242) {
tmp = (1.0 - b) / (y * (a / x));
} else if (b <= 3.7e-209) {
tmp = x / (y * (a * b));
} else if (b <= 1e-95) {
tmp = ((1.0 - b) / (a / x)) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.25e+53: tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)) elif b <= 1.4e-242: tmp = (1.0 - b) / (y * (a / x)) elif b <= 3.7e-209: tmp = x / (y * (a * b)) elif b <= 1e-95: tmp = ((1.0 - b) / (a / x)) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.25e+53) tmp = Float64(Float64(Float64(x - Float64(x * b)) / Float64(y * a)) + Float64(Float64(x / y) * Float64(Float64(b * b) / a))); elseif (b <= 1.4e-242) tmp = Float64(Float64(1.0 - b) / Float64(y * Float64(a / x))); elseif (b <= 3.7e-209) tmp = Float64(x / Float64(y * Float64(a * b))); elseif (b <= 1e-95) tmp = Float64(Float64(Float64(1.0 - b) / Float64(a / x)) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.25e+53) tmp = ((x - (x * b)) / (y * a)) + ((x / y) * ((b * b) / a)); elseif (b <= 1.4e-242) tmp = (1.0 - b) / (y * (a / x)); elseif (b <= 3.7e-209) tmp = x / (y * (a * b)); elseif (b <= 1e-95) tmp = ((1.0 - b) / (a / x)) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.25e+53], N[(N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e-242], N[(N[(1.0 - b), $MachinePrecision] / N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.7e-209], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e-95], N[(N[(N[(1.0 - b), $MachinePrecision] / N[(a / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{+53}:\\
\;\;\;\;\frac{x - x \cdot b}{y \cdot a} + \frac{x}{y} \cdot \frac{b \cdot b}{a}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-242}:\\
\;\;\;\;\frac{1 - b}{y \cdot \frac{a}{x}}\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-209}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\mathbf{elif}\;b \leq 10^{-95}:\\
\;\;\;\;\frac{\frac{1 - b}{\frac{a}{x}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.2500000000000001e53Initial program 100.0%
associate-*l/93.9%
*-commutative93.9%
Simplified65.3%
Taylor expanded in t around 0 69.5%
Taylor expanded in y around 0 83.9%
Taylor expanded in b around 0 7.0%
distribute-lft-out11.2%
*-commutative11.2%
Simplified11.2%
Taylor expanded in b around 0 64.2%
+-commutative64.2%
*-commutative64.2%
mul-1-neg64.2%
times-frac63.9%
*-commutative63.9%
sub-neg63.9%
*-commutative63.9%
times-frac64.2%
*-commutative64.2%
div-sub64.2%
times-frac62.4%
unpow262.4%
Simplified62.4%
if -1.2500000000000001e53 < b < 1.39999999999999992e-242Initial program 97.2%
Taylor expanded in t around 0 73.6%
mul-1-neg73.6%
unsub-neg73.6%
Simplified73.6%
Taylor expanded in y around 0 47.0%
exp-neg47.0%
associate-*l/47.0%
*-lft-identity47.0%
exp-sum47.0%
rem-exp-log47.8%
*-commutative47.8%
associate-/r*47.8%
Simplified47.8%
Taylor expanded in b around 0 40.6%
+-commutative40.6%
mul-1-neg40.6%
unsub-neg40.6%
associate-/l*39.5%
Simplified39.5%
Taylor expanded in x around 0 40.6%
div-sub40.6%
associate-/r/40.6%
associate-/l/40.7%
Simplified40.7%
if 1.39999999999999992e-242 < b < 3.6999999999999998e-209Initial program 100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified80.0%
Taylor expanded in t around 0 51.8%
Taylor expanded in y around 0 14.0%
Taylor expanded in b around 0 14.0%
distribute-lft-out14.0%
*-commutative14.0%
Simplified14.0%
Taylor expanded in b around inf 61.4%
associate-*r*61.2%
*-commutative61.2%
associate-*r*70.9%
Simplified70.9%
if 3.6999999999999998e-209 < b < 9.99999999999999989e-96Initial program 99.0%
Taylor expanded in t around 0 68.2%
mul-1-neg68.2%
unsub-neg68.2%
Simplified68.2%
Taylor expanded in y around 0 41.5%
exp-neg41.5%
associate-*l/41.5%
*-lft-identity41.5%
exp-sum41.5%
rem-exp-log42.4%
*-commutative42.4%
associate-/r*42.4%
Simplified42.4%
Taylor expanded in b around 0 42.4%
+-commutative42.4%
mul-1-neg42.4%
unsub-neg42.4%
associate-/l*42.3%
Simplified42.3%
clear-num46.7%
sub-div46.7%
Applied egg-rr46.7%
if 9.99999999999999989e-96 < b Initial program 98.7%
associate-*l/87.2%
*-commutative87.2%
Simplified66.3%
Taylor expanded in t around 0 70.2%
Taylor expanded in y around 0 70.7%
Taylor expanded in b around 0 35.3%
Final simplification44.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1e-47)
(* (/ x a) (/ (- b) y))
(if (<= b 8.5e-242)
(* (/ x y) (/ 1.0 a))
(if (<= b 9.5e-208)
(/ x (* y (* a b)))
(if (<= b 2.4e-102) (/ (/ x a) y) (/ x (* y (+ a (* a b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-47) {
tmp = (x / a) * (-b / y);
} else if (b <= 8.5e-242) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 9.5e-208) {
tmp = x / (y * (a * b));
} else if (b <= 2.4e-102) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a + (a * 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 <= (-1d-47)) then
tmp = (x / a) * (-b / y)
else if (b <= 8.5d-242) then
tmp = (x / y) * (1.0d0 / a)
else if (b <= 9.5d-208) then
tmp = x / (y * (a * b))
else if (b <= 2.4d-102) then
tmp = (x / a) / y
else
tmp = x / (y * (a + (a * 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 <= -1e-47) {
tmp = (x / a) * (-b / y);
} else if (b <= 8.5e-242) {
tmp = (x / y) * (1.0 / a);
} else if (b <= 9.5e-208) {
tmp = x / (y * (a * b));
} else if (b <= 2.4e-102) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e-47: tmp = (x / a) * (-b / y) elif b <= 8.5e-242: tmp = (x / y) * (1.0 / a) elif b <= 9.5e-208: tmp = x / (y * (a * b)) elif b <= 2.4e-102: tmp = (x / a) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e-47) tmp = Float64(Float64(x / a) * Float64(Float64(-b) / y)); elseif (b <= 8.5e-242) tmp = Float64(Float64(x / y) * Float64(1.0 / a)); elseif (b <= 9.5e-208) tmp = Float64(x / Float64(y * Float64(a * b))); elseif (b <= 2.4e-102) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1e-47) tmp = (x / a) * (-b / y); elseif (b <= 8.5e-242) tmp = (x / y) * (1.0 / a); elseif (b <= 9.5e-208) tmp = x / (y * (a * b)); elseif (b <= 2.4e-102) tmp = (x / a) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e-47], N[(N[(x / a), $MachinePrecision] * N[((-b) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-242], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e-208], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e-102], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{-b}{y}\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-242}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-208}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{-102}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -9.9999999999999997e-48Initial program 98.7%
Taylor expanded in t around 0 84.4%
mul-1-neg84.4%
unsub-neg84.4%
Simplified84.4%
Taylor expanded in y around 0 74.0%
exp-neg74.0%
associate-*l/74.0%
*-lft-identity74.0%
exp-sum74.0%
rem-exp-log74.0%
*-commutative74.0%
associate-/r*66.0%
Simplified66.0%
Taylor expanded in b around 0 37.9%
+-commutative37.9%
mul-1-neg37.9%
unsub-neg37.9%
associate-/l*37.9%
Simplified37.9%
Taylor expanded in b around inf 34.2%
mul-1-neg34.2%
times-frac39.1%
*-commutative39.1%
distribute-rgt-neg-in39.1%
Simplified39.1%
if -9.9999999999999997e-48 < b < 8.4999999999999997e-242Initial program 97.5%
associate-*l/88.8%
*-commutative88.8%
Simplified76.9%
Taylor expanded in t around 0 68.6%
Taylor expanded in y around 0 43.5%
Taylor expanded in b around 0 43.5%
*-commutative43.5%
Simplified43.5%
*-un-lft-identity43.5%
*-commutative43.5%
times-frac45.0%
Applied egg-rr45.0%
if 8.4999999999999997e-242 < b < 9.5000000000000001e-208Initial program 100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified80.0%
Taylor expanded in t around 0 51.8%
Taylor expanded in y around 0 14.0%
Taylor expanded in b around 0 14.0%
distribute-lft-out14.0%
*-commutative14.0%
Simplified14.0%
Taylor expanded in b around inf 61.4%
associate-*r*61.2%
*-commutative61.2%
associate-*r*70.9%
Simplified70.9%
if 9.5000000000000001e-208 < b < 2.4e-102Initial program 99.0%
associate-*l/84.7%
*-commutative84.7%
Simplified80.8%
Taylor expanded in t around 0 40.2%
Taylor expanded in y around 0 26.4%
Taylor expanded in b around 0 26.4%
associate-/r*44.3%
Simplified44.3%
if 2.4e-102 < b Initial program 98.7%
associate-*l/86.1%
*-commutative86.1%
Simplified65.4%
Taylor expanded in t around 0 69.3%
Taylor expanded in y around 0 69.9%
Taylor expanded in b around 0 34.9%
Final simplification41.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1e-47)
(* (/ x a) (/ (- b) y))
(if (<= b 2.8e-243)
(* (/ x y) (/ 1.0 a))
(if (or (<= b 4.1e-207) (not (<= b 8.5e-55)))
(/ x (* y (* a b)))
(/ (/ x a) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-47) {
tmp = (x / a) * (-b / y);
} else if (b <= 2.8e-243) {
tmp = (x / y) * (1.0 / a);
} else if ((b <= 4.1e-207) || !(b <= 8.5e-55)) {
tmp = x / (y * (a * b));
} else {
tmp = (x / a) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1d-47)) then
tmp = (x / a) * (-b / y)
else if (b <= 2.8d-243) then
tmp = (x / y) * (1.0d0 / a)
else if ((b <= 4.1d-207) .or. (.not. (b <= 8.5d-55))) then
tmp = x / (y * (a * b))
else
tmp = (x / a) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e-47) {
tmp = (x / a) * (-b / y);
} else if (b <= 2.8e-243) {
tmp = (x / y) * (1.0 / a);
} else if ((b <= 4.1e-207) || !(b <= 8.5e-55)) {
tmp = x / (y * (a * b));
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e-47: tmp = (x / a) * (-b / y) elif b <= 2.8e-243: tmp = (x / y) * (1.0 / a) elif (b <= 4.1e-207) or not (b <= 8.5e-55): tmp = x / (y * (a * b)) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e-47) tmp = Float64(Float64(x / a) * Float64(Float64(-b) / y)); elseif (b <= 2.8e-243) tmp = Float64(Float64(x / y) * Float64(1.0 / a)); elseif ((b <= 4.1e-207) || !(b <= 8.5e-55)) tmp = Float64(x / Float64(y * Float64(a * b))); else tmp = Float64(Float64(x / a) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1e-47) tmp = (x / a) * (-b / y); elseif (b <= 2.8e-243) tmp = (x / y) * (1.0 / a); elseif ((b <= 4.1e-207) || ~((b <= 8.5e-55))) tmp = x / (y * (a * b)); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e-47], N[(N[(x / a), $MachinePrecision] * N[((-b) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e-243], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 4.1e-207], N[Not[LessEqual[b, 8.5e-55]], $MachinePrecision]], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{a} \cdot \frac{-b}{y}\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-243}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\
\mathbf{elif}\;b \leq 4.1 \cdot 10^{-207} \lor \neg \left(b \leq 8.5 \cdot 10^{-55}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < -9.9999999999999997e-48Initial program 98.7%
Taylor expanded in t around 0 84.4%
mul-1-neg84.4%
unsub-neg84.4%
Simplified84.4%
Taylor expanded in y around 0 74.0%
exp-neg74.0%
associate-*l/74.0%
*-lft-identity74.0%
exp-sum74.0%
rem-exp-log74.0%
*-commutative74.0%
associate-/r*66.0%
Simplified66.0%
Taylor expanded in b around 0 37.9%
+-commutative37.9%
mul-1-neg37.9%
unsub-neg37.9%
associate-/l*37.9%
Simplified37.9%
Taylor expanded in b around inf 34.2%
mul-1-neg34.2%
times-frac39.1%
*-commutative39.1%
distribute-rgt-neg-in39.1%
Simplified39.1%
if -9.9999999999999997e-48 < b < 2.79999999999999994e-243Initial program 97.5%
associate-*l/88.8%
*-commutative88.8%
Simplified76.9%
Taylor expanded in t around 0 68.6%
Taylor expanded in y around 0 43.5%
Taylor expanded in b around 0 43.5%
*-commutative43.5%
Simplified43.5%
*-un-lft-identity43.5%
*-commutative43.5%
times-frac45.0%
Applied egg-rr45.0%
if 2.79999999999999994e-243 < b < 4.0999999999999999e-207 or 8.49999999999999968e-55 < b Initial program 99.9%
associate-*l/87.5%
*-commutative87.5%
Simplified64.2%
Taylor expanded in t around 0 72.0%
Taylor expanded in y around 0 65.2%
Taylor expanded in b around 0 28.2%
distribute-lft-out28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in b around inf 35.2%
associate-*r*33.9%
*-commutative33.9%
associate-*r*38.4%
Simplified38.4%
if 4.0999999999999999e-207 < b < 8.49999999999999968e-55Initial program 96.2%
associate-*l/86.0%
*-commutative86.0%
Simplified83.8%
Taylor expanded in t around 0 59.5%
Taylor expanded in y around 0 34.5%
Taylor expanded in b around 0 34.5%
associate-/r*43.6%
Simplified43.6%
Final simplification41.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= b 1.4e-239)
(/ (* x (/ (- 1.0 b) a)) y)
(if (<= b 1.2e-208)
(/ x (* y (* a b)))
(if (<= b 2.5e-102) (/ (/ x a) y) (/ x (* y (+ a (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.4e-239) {
tmp = (x * ((1.0 - b) / a)) / y;
} else if (b <= 1.2e-208) {
tmp = x / (y * (a * b));
} else if (b <= 2.5e-102) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a + (a * 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.4d-239) then
tmp = (x * ((1.0d0 - b) / a)) / y
else if (b <= 1.2d-208) then
tmp = x / (y * (a * b))
else if (b <= 2.5d-102) then
tmp = (x / a) / y
else
tmp = x / (y * (a + (a * 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.4e-239) {
tmp = (x * ((1.0 - b) / a)) / y;
} else if (b <= 1.2e-208) {
tmp = x / (y * (a * b));
} else if (b <= 2.5e-102) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.4e-239: tmp = (x * ((1.0 - b) / a)) / y elif b <= 1.2e-208: tmp = x / (y * (a * b)) elif b <= 2.5e-102: tmp = (x / a) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.4e-239) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / a)) / y); elseif (b <= 1.2e-208) tmp = Float64(x / Float64(y * Float64(a * b))); elseif (b <= 2.5e-102) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.4e-239) tmp = (x * ((1.0 - b) / a)) / y; elseif (b <= 1.2e-208) tmp = x / (y * (a * b)); elseif (b <= 2.5e-102) tmp = (x / a) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.4e-239], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.2e-208], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e-102], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.4 \cdot 10^{-239}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{a}}{y}\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{-208}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{-102}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.40000000000000006e-239Initial program 98.1%
Taylor expanded in t around 0 78.5%
mul-1-neg78.5%
unsub-neg78.5%
Simplified78.5%
Taylor expanded in y around 0 59.5%
exp-neg59.5%
associate-*l/59.5%
*-lft-identity59.5%
exp-sum59.5%
rem-exp-log60.1%
*-commutative60.1%
associate-/r*55.9%
Simplified55.9%
Taylor expanded in b around 0 41.3%
+-commutative41.3%
mul-1-neg41.3%
unsub-neg41.3%
associate-/l*40.5%
Simplified40.5%
Taylor expanded in x around 0 42.0%
*-commutative42.0%
div-sub42.0%
Simplified42.0%
if 1.40000000000000006e-239 < b < 1.1999999999999999e-208Initial program 100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified80.0%
Taylor expanded in t around 0 51.8%
Taylor expanded in y around 0 14.0%
Taylor expanded in b around 0 14.0%
distribute-lft-out14.0%
*-commutative14.0%
Simplified14.0%
Taylor expanded in b around inf 61.4%
associate-*r*61.2%
*-commutative61.2%
associate-*r*70.9%
Simplified70.9%
if 1.1999999999999999e-208 < b < 2.50000000000000013e-102Initial program 99.0%
associate-*l/84.7%
*-commutative84.7%
Simplified80.8%
Taylor expanded in t around 0 40.2%
Taylor expanded in y around 0 26.4%
Taylor expanded in b around 0 26.4%
associate-/r*44.3%
Simplified44.3%
if 2.50000000000000013e-102 < b Initial program 98.7%
associate-*l/86.1%
*-commutative86.1%
Simplified65.4%
Taylor expanded in t around 0 69.3%
Taylor expanded in y around 0 69.9%
Taylor expanded in b around 0 34.9%
Final simplification41.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b 6e-243)
(/ (* x (/ (- 1.0 b) a)) y)
(if (<= b 1.08e-203)
(/ x (* y (* a b)))
(if (<= b 2.3e-102)
(/ (- 1.0 b) (* y (/ a x)))
(/ x (* y (+ a (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 6e-243) {
tmp = (x * ((1.0 - b) / a)) / y;
} else if (b <= 1.08e-203) {
tmp = x / (y * (a * b));
} else if (b <= 2.3e-102) {
tmp = (1.0 - b) / (y * (a / x));
} else {
tmp = x / (y * (a + (a * 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-243) then
tmp = (x * ((1.0d0 - b) / a)) / y
else if (b <= 1.08d-203) then
tmp = x / (y * (a * b))
else if (b <= 2.3d-102) then
tmp = (1.0d0 - b) / (y * (a / x))
else
tmp = x / (y * (a + (a * 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-243) {
tmp = (x * ((1.0 - b) / a)) / y;
} else if (b <= 1.08e-203) {
tmp = x / (y * (a * b));
} else if (b <= 2.3e-102) {
tmp = (1.0 - b) / (y * (a / x));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 6e-243: tmp = (x * ((1.0 - b) / a)) / y elif b <= 1.08e-203: tmp = x / (y * (a * b)) elif b <= 2.3e-102: tmp = (1.0 - b) / (y * (a / x)) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 6e-243) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / a)) / y); elseif (b <= 1.08e-203) tmp = Float64(x / Float64(y * Float64(a * b))); elseif (b <= 2.3e-102) tmp = Float64(Float64(1.0 - b) / Float64(y * Float64(a / x))); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 6e-243) tmp = (x * ((1.0 - b) / a)) / y; elseif (b <= 1.08e-203) tmp = x / (y * (a * b)); elseif (b <= 2.3e-102) tmp = (1.0 - b) / (y * (a / x)); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 6e-243], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 1.08e-203], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e-102], N[(N[(1.0 - b), $MachinePrecision] / N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 6 \cdot 10^{-243}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{a}}{y}\\
\mathbf{elif}\;b \leq 1.08 \cdot 10^{-203}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{-102}:\\
\;\;\;\;\frac{1 - b}{y \cdot \frac{a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < 6.0000000000000002e-243Initial program 98.1%
Taylor expanded in t around 0 78.5%
mul-1-neg78.5%
unsub-neg78.5%
Simplified78.5%
Taylor expanded in y around 0 59.5%
exp-neg59.5%
associate-*l/59.5%
*-lft-identity59.5%
exp-sum59.5%
rem-exp-log60.1%
*-commutative60.1%
associate-/r*55.9%
Simplified55.9%
Taylor expanded in b around 0 41.3%
+-commutative41.3%
mul-1-neg41.3%
unsub-neg41.3%
associate-/l*40.5%
Simplified40.5%
Taylor expanded in x around 0 42.0%
*-commutative42.0%
div-sub42.0%
Simplified42.0%
if 6.0000000000000002e-243 < b < 1.07999999999999997e-203Initial program 100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified80.0%
Taylor expanded in t around 0 51.8%
Taylor expanded in y around 0 14.0%
Taylor expanded in b around 0 14.0%
distribute-lft-out14.0%
*-commutative14.0%
Simplified14.0%
Taylor expanded in b around inf 61.4%
associate-*r*61.2%
*-commutative61.2%
associate-*r*70.9%
Simplified70.9%
if 1.07999999999999997e-203 < b < 2.29999999999999987e-102Initial program 99.0%
Taylor expanded in t around 0 66.7%
mul-1-neg66.7%
unsub-neg66.7%
Simplified66.7%
Taylor expanded in y around 0 43.3%
exp-neg43.3%
associate-*l/43.3%
*-lft-identity43.3%
exp-sum43.3%
rem-exp-log44.3%
*-commutative44.3%
associate-/r*44.3%
Simplified44.3%
Taylor expanded in b around 0 44.3%
+-commutative44.3%
mul-1-neg44.3%
unsub-neg44.3%
associate-/l*44.3%
Simplified44.3%
Taylor expanded in x around 0 44.3%
div-sub44.3%
associate-/r/48.9%
associate-/l/48.7%
Simplified48.7%
if 2.29999999999999987e-102 < b Initial program 98.7%
associate-*l/86.1%
*-commutative86.1%
Simplified65.4%
Taylor expanded in t around 0 69.3%
Taylor expanded in y around 0 69.9%
Taylor expanded in b around 0 34.9%
Final simplification41.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b 1.9e-240)
(/ (* x (/ (- 1.0 b) a)) y)
(if (<= b 9.4e-210)
(/ x (* y (* a b)))
(if (<= b 2.3e-102)
(/ (/ (- 1.0 b) (/ a x)) y)
(/ x (* y (+ a (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.9e-240) {
tmp = (x * ((1.0 - b) / a)) / y;
} else if (b <= 9.4e-210) {
tmp = x / (y * (a * b));
} else if (b <= 2.3e-102) {
tmp = ((1.0 - b) / (a / x)) / y;
} else {
tmp = x / (y * (a + (a * 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.9d-240) then
tmp = (x * ((1.0d0 - b) / a)) / y
else if (b <= 9.4d-210) then
tmp = x / (y * (a * b))
else if (b <= 2.3d-102) then
tmp = ((1.0d0 - b) / (a / x)) / y
else
tmp = x / (y * (a + (a * 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.9e-240) {
tmp = (x * ((1.0 - b) / a)) / y;
} else if (b <= 9.4e-210) {
tmp = x / (y * (a * b));
} else if (b <= 2.3e-102) {
tmp = ((1.0 - b) / (a / x)) / y;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.9e-240: tmp = (x * ((1.0 - b) / a)) / y elif b <= 9.4e-210: tmp = x / (y * (a * b)) elif b <= 2.3e-102: tmp = ((1.0 - b) / (a / x)) / y else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.9e-240) tmp = Float64(Float64(x * Float64(Float64(1.0 - b) / a)) / y); elseif (b <= 9.4e-210) tmp = Float64(x / Float64(y * Float64(a * b))); elseif (b <= 2.3e-102) tmp = Float64(Float64(Float64(1.0 - b) / Float64(a / x)) / y); else tmp = Float64(x / Float64(y * Float64(a + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 1.9e-240) tmp = (x * ((1.0 - b) / a)) / y; elseif (b <= 9.4e-210) tmp = x / (y * (a * b)); elseif (b <= 2.3e-102) tmp = ((1.0 - b) / (a / x)) / y; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.9e-240], N[(N[(x * N[(N[(1.0 - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 9.4e-210], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e-102], N[(N[(N[(1.0 - b), $MachinePrecision] / N[(a / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.9 \cdot 10^{-240}:\\
\;\;\;\;\frac{x \cdot \frac{1 - b}{a}}{y}\\
\mathbf{elif}\;b \leq 9.4 \cdot 10^{-210}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{-102}:\\
\;\;\;\;\frac{\frac{1 - b}{\frac{a}{x}}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.89999999999999994e-240Initial program 98.1%
Taylor expanded in t around 0 78.5%
mul-1-neg78.5%
unsub-neg78.5%
Simplified78.5%
Taylor expanded in y around 0 59.5%
exp-neg59.5%
associate-*l/59.5%
*-lft-identity59.5%
exp-sum59.5%
rem-exp-log60.1%
*-commutative60.1%
associate-/r*55.9%
Simplified55.9%
Taylor expanded in b around 0 41.3%
+-commutative41.3%
mul-1-neg41.3%
unsub-neg41.3%
associate-/l*40.5%
Simplified40.5%
Taylor expanded in x around 0 42.0%
*-commutative42.0%
div-sub42.0%
Simplified42.0%
if 1.89999999999999994e-240 < b < 9.39999999999999933e-210Initial program 100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified80.0%
Taylor expanded in t around 0 51.8%
Taylor expanded in y around 0 14.0%
Taylor expanded in b around 0 14.0%
distribute-lft-out14.0%
*-commutative14.0%
Simplified14.0%
Taylor expanded in b around inf 61.4%
associate-*r*61.2%
*-commutative61.2%
associate-*r*70.9%
Simplified70.9%
if 9.39999999999999933e-210 < b < 2.29999999999999987e-102Initial program 99.0%
Taylor expanded in t around 0 66.7%
mul-1-neg66.7%
unsub-neg66.7%
Simplified66.7%
Taylor expanded in y around 0 43.3%
exp-neg43.3%
associate-*l/43.3%
*-lft-identity43.3%
exp-sum43.3%
rem-exp-log44.3%
*-commutative44.3%
associate-/r*44.3%
Simplified44.3%
Taylor expanded in b around 0 44.3%
+-commutative44.3%
mul-1-neg44.3%
unsub-neg44.3%
associate-/l*44.3%
Simplified44.3%
clear-num48.8%
sub-div48.9%
Applied egg-rr48.9%
if 2.29999999999999987e-102 < b Initial program 98.7%
associate-*l/86.1%
*-commutative86.1%
Simplified65.4%
Taylor expanded in t around 0 69.3%
Taylor expanded in y around 0 69.9%
Taylor expanded in b around 0 34.9%
Final simplification41.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b 3.1e-247) (and (not (<= b 1.35e-209)) (<= b 5e-55))) (/ (/ x a) y) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= 3.1e-247) || (!(b <= 1.35e-209) && (b <= 5e-55))) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= 3.1d-247) .or. (.not. (b <= 1.35d-209)) .and. (b <= 5d-55)) then
tmp = (x / a) / y
else
tmp = x / (y * (a * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= 3.1e-247) || (!(b <= 1.35e-209) && (b <= 5e-55))) {
tmp = (x / a) / y;
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= 3.1e-247) or (not (b <= 1.35e-209) and (b <= 5e-55)): tmp = (x / a) / y else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= 3.1e-247) || (!(b <= 1.35e-209) && (b <= 5e-55))) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(y * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= 3.1e-247) || (~((b <= 1.35e-209)) && (b <= 5e-55))) tmp = (x / a) / y; else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, 3.1e-247], And[N[Not[LessEqual[b, 1.35e-209]], $MachinePrecision], LessEqual[b, 5e-55]]], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.1 \cdot 10^{-247} \lor \neg \left(b \leq 1.35 \cdot 10^{-209}\right) \land b \leq 5 \cdot 10^{-55}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 3.10000000000000015e-247 or 1.34999999999999999e-209 < b < 5.0000000000000002e-55Initial program 97.8%
associate-*l/90.8%
*-commutative90.8%
Simplified74.3%
Taylor expanded in t around 0 67.4%
Taylor expanded in y around 0 55.0%
Taylor expanded in b around 0 33.0%
associate-/r*37.3%
Simplified37.3%
if 3.10000000000000015e-247 < b < 1.34999999999999999e-209 or 5.0000000000000002e-55 < b Initial program 99.9%
associate-*l/87.5%
*-commutative87.5%
Simplified64.2%
Taylor expanded in t around 0 72.0%
Taylor expanded in y around 0 65.2%
Taylor expanded in b around 0 28.2%
distribute-lft-out28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in b around inf 35.2%
associate-*r*33.9%
*-commutative33.9%
associate-*r*38.4%
Simplified38.4%
Final simplification37.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 4.9e-54) (/ (/ x a) y) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.9e-54) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (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 <= 4.9d-54) then
tmp = (x / a) / y
else
tmp = x / (a * (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 <= 4.9e-54) {
tmp = (x / a) / y;
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 4.9e-54: tmp = (x / a) / y else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 4.9e-54) tmp = Float64(Float64(x / a) / y); else tmp = Float64(x / Float64(a * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= 4.9e-54) tmp = (x / a) / y; else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 4.9e-54], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.9 \cdot 10^{-54}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 4.90000000000000021e-54Initial program 97.9%
associate-*l/91.3%
*-commutative91.3%
Simplified74.6%
Taylor expanded in t around 0 66.6%
Taylor expanded in y around 0 52.8%
Taylor expanded in b around 0 32.0%
associate-/r*36.5%
Simplified36.5%
if 4.90000000000000021e-54 < b Initial program 99.9%
associate-*l/85.8%
*-commutative85.8%
Simplified62.0%
Taylor expanded in t around 0 74.8%
Taylor expanded in y around 0 72.4%
Taylor expanded in b around 0 30.2%
distribute-lft-out30.2%
*-commutative30.2%
Simplified30.2%
Taylor expanded in b around inf 31.5%
Final simplification35.1%
(FPCore (x y z t a b) :precision binary64 (/ 1.0 (/ y (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (y / (x / 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 = 1.0d0 / (y / (x / a))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 1.0 / (y / (x / a));
}
def code(x, y, z, t, a, b): return 1.0 / (y / (x / a))
function code(x, y, z, t, a, b) return Float64(1.0 / Float64(y / Float64(x / a))) end
function tmp = code(x, y, z, t, a, b) tmp = 1.0 / (y / (x / a)); end
code[x_, y_, z_, t_, a_, b_] := N[(1.0 / N[(y / N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{y}{\frac{x}{a}}}
\end{array}
Initial program 98.5%
associate-*l/89.8%
*-commutative89.8%
Simplified71.1%
Taylor expanded in t around 0 68.9%
Taylor expanded in y around 0 58.2%
Taylor expanded in b around 0 26.8%
*-commutative26.8%
Simplified26.8%
clear-num27.0%
inv-pow27.0%
Applied egg-rr27.0%
unpow-127.0%
associate-/l*31.4%
Simplified31.4%
Final simplification31.4%
(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.5%
associate-*l/89.8%
*-commutative89.8%
Simplified71.1%
Taylor expanded in t around 0 68.9%
Taylor expanded in y around 0 58.2%
Taylor expanded in b around 0 26.8%
*-commutative26.8%
Simplified26.8%
Final simplification26.8%
(FPCore (x y z t a b) :precision binary64 (/ (/ x a) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x / a) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x / a) / y;
}
def code(x, y, z, t, a, b): return (x / a) / y
function code(x, y, z, t, a, b) return Float64(Float64(x / a) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x / a) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{a}}{y}
\end{array}
Initial program 98.5%
associate-*l/89.8%
*-commutative89.8%
Simplified71.1%
Taylor expanded in t around 0 68.9%
Taylor expanded in y around 0 58.2%
Taylor expanded in b around 0 26.8%
associate-/r*31.2%
Simplified31.2%
Final simplification31.2%
(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 2023230
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(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))