
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y}
\end{array}
Initial program 98.7%
Final simplification98.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -500000000.0) (not (<= (+ t -1.0) -0.999999999))) (/ (* 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) <= -500000000.0) || !((t + -1.0) <= -0.999999999)) {
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)) <= (-500000000.0d0)) .or. (.not. ((t + (-1.0d0)) <= (-0.999999999d0)))) 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) <= -500000000.0) || !((t + -1.0) <= -0.999999999)) {
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) <= -500000000.0) or not ((t + -1.0) <= -0.999999999): 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) <= -500000000.0) || !(Float64(t + -1.0) <= -0.999999999)) 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) <= -500000000.0) || ~(((t + -1.0) <= -0.999999999))) 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], -500000000.0], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -0.999999999]], $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 -500000000 \lor \neg \left(t + -1 \leq -0.999999999\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) < -5e8 or -0.999999999000000028 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 93.7%
if -5e8 < (-.f64 t 1) < -0.999999999000000028Initial program 97.2%
Taylor expanded in t around 0 97.2%
mul-1-neg97.2%
Simplified97.2%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= (+ t -1.0) -1e+75)
(and (not (<= (+ t -1.0) -5e+66))
(or (<= (+ t -1.0) -500000000.0) (not (<= (+ t -1.0) -0.5)))))
(* x (/ (pow a (+ t -1.0)) y))
(/ (* x (pow z y)) (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -1e+75) || (!((t + -1.0) <= -5e+66) && (((t + -1.0) <= -500000000.0) || !((t + -1.0) <= -0.5)))) {
tmp = x * (pow(a, (t + -1.0)) / y);
} else {
tmp = (x * pow(z, y)) / (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 + (-1.0d0)) <= (-1d+75)) .or. (.not. ((t + (-1.0d0)) <= (-5d+66))) .and. ((t + (-1.0d0)) <= (-500000000.0d0)) .or. (.not. ((t + (-1.0d0)) <= (-0.5d0)))) then
tmp = x * ((a ** (t + (-1.0d0))) / y)
else
tmp = (x * (z ** y)) / (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 + -1.0) <= -1e+75) || (!((t + -1.0) <= -5e+66) && (((t + -1.0) <= -500000000.0) || !((t + -1.0) <= -0.5)))) {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
} else {
tmp = (x * Math.pow(z, y)) / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -1e+75) or (not ((t + -1.0) <= -5e+66) and (((t + -1.0) <= -500000000.0) or not ((t + -1.0) <= -0.5))): tmp = x * (math.pow(a, (t + -1.0)) / y) else: tmp = (x * math.pow(z, y)) / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -1e+75) || (!(Float64(t + -1.0) <= -5e+66) && ((Float64(t + -1.0) <= -500000000.0) || !(Float64(t + -1.0) <= -0.5)))) tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); else tmp = Float64(Float64(x * (z ^ y)) / 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 + -1.0) <= -1e+75) || (~(((t + -1.0) <= -5e+66)) && (((t + -1.0) <= -500000000.0) || ~(((t + -1.0) <= -0.5))))) tmp = x * ((a ^ (t + -1.0)) / y); else tmp = (x * (z ^ y)) / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -1e+75], And[N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -5e+66]], $MachinePrecision], Or[LessEqual[N[(t + -1.0), $MachinePrecision], -500000000.0], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], -0.5]], $MachinePrecision]]]], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -1 \cdot 10^{+75} \lor \neg \left(t + -1 \leq -5 \cdot 10^{+66}\right) \land \left(t + -1 \leq -500000000 \lor \neg \left(t + -1 \leq -0.5\right)\right):\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if (-.f64 t 1) < -9.99999999999999927e74 or -4.99999999999999991e66 < (-.f64 t 1) < -5e8 or -0.5 < (-.f64 t 1) Initial program 100.0%
Taylor expanded in y around 0 94.1%
Taylor expanded in b around 0 87.4%
Simplified87.4%
if -9.99999999999999927e74 < (-.f64 t 1) < -4.99999999999999991e66 or -5e8 < (-.f64 t 1) < -0.5Initial program 97.4%
associate-*l/84.8%
*-commutative84.8%
+-commutative84.8%
associate--l+84.8%
exp-sum80.7%
*-commutative80.7%
exp-to-pow81.3%
sub-neg81.3%
metadata-eval81.3%
exp-diff73.1%
*-commutative73.1%
exp-to-pow73.1%
Simplified73.1%
Taylor expanded in t around 0 87.8%
Final simplification87.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow a (+ t -1.0)) y))))
(if (<= t -1.26e+75)
t_1
(if (<= t -4.8e+66)
(/ (/ (pow z y) a) (* (exp b) (/ y x)))
(if (or (<= t -820000000.0) (not (<= t 82.0)))
t_1
(/ (* x (pow z y)) (* a (* y (exp b)))))))))
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.26e+75) {
tmp = t_1;
} else if (t <= -4.8e+66) {
tmp = (pow(z, y) / a) / (exp(b) * (y / x));
} else if ((t <= -820000000.0) || !(t <= 82.0)) {
tmp = t_1;
} else {
tmp = (x * pow(z, y)) / (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) :: t_1
real(8) :: tmp
t_1 = x * ((a ** (t + (-1.0d0))) / y)
if (t <= (-1.26d+75)) then
tmp = t_1
else if (t <= (-4.8d+66)) then
tmp = ((z ** y) / a) / (exp(b) * (y / x))
else if ((t <= (-820000000.0d0)) .or. (.not. (t <= 82.0d0))) then
tmp = t_1
else
tmp = (x * (z ** y)) / (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 t_1 = x * (Math.pow(a, (t + -1.0)) / y);
double tmp;
if (t <= -1.26e+75) {
tmp = t_1;
} else if (t <= -4.8e+66) {
tmp = (Math.pow(z, y) / a) / (Math.exp(b) * (y / x));
} else if ((t <= -820000000.0) || !(t <= 82.0)) {
tmp = t_1;
} else {
tmp = (x * Math.pow(z, y)) / (a * (y * Math.exp(b)));
}
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.26e+75: tmp = t_1 elif t <= -4.8e+66: tmp = (math.pow(z, y) / a) / (math.exp(b) * (y / x)) elif (t <= -820000000.0) or not (t <= 82.0): tmp = t_1 else: tmp = (x * math.pow(z, y)) / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)) tmp = 0.0 if (t <= -1.26e+75) tmp = t_1; elseif (t <= -4.8e+66) tmp = Float64(Float64((z ^ y) / a) / Float64(exp(b) * Float64(y / x))); elseif ((t <= -820000000.0) || !(t <= 82.0)) tmp = t_1; else tmp = Float64(Float64(x * (z ^ y)) / Float64(a * Float64(y * exp(b)))); 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.26e+75) tmp = t_1; elseif (t <= -4.8e+66) tmp = ((z ^ y) / a) / (exp(b) * (y / x)); elseif ((t <= -820000000.0) || ~((t <= 82.0))) tmp = t_1; else tmp = (x * (z ^ y)) / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.26e+75], t$95$1, If[LessEqual[t, -4.8e+66], N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / N[(N[Exp[b], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -820000000.0], N[Not[LessEqual[t, 82.0]], $MachinePrecision]], t$95$1, N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\mathbf{if}\;t \leq -1.26 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{+66}:\\
\;\;\;\;\frac{\frac{{z}^{y}}{a}}{e^{b} \cdot \frac{y}{x}}\\
\mathbf{elif}\;t \leq -820000000 \lor \neg \left(t \leq 82\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -1.26000000000000003e75 or -4.8000000000000003e66 < t < -8.2e8 or 82 < t Initial program 100.0%
Taylor expanded in y around 0 94.8%
Taylor expanded in b around 0 88.1%
Simplified88.1%
if -1.26000000000000003e75 < t < -4.8000000000000003e66Initial program 100.0%
*-commutative100.0%
associate-/l*100.0%
exp-diff50.0%
associate-/l/50.0%
exp-sum0.0%
*-commutative0.0%
exp-to-pow0.0%
*-commutative0.0%
exp-to-pow0.0%
sub-neg0.0%
metadata-eval0.0%
Simplified0.0%
Taylor expanded in t around 0 100.0%
if -8.2e8 < t < 82Initial program 97.3%
associate-*l/84.1%
*-commutative84.1%
+-commutative84.1%
associate--l+84.1%
exp-sum84.1%
*-commutative84.1%
exp-to-pow84.7%
sub-neg84.7%
metadata-eval84.7%
exp-diff76.2%
*-commutative76.2%
exp-to-pow76.2%
Simplified76.2%
Taylor expanded in t around 0 87.3%
Final simplification88.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.85e-7) (not (<= t 1.9e-39))) (/ (* x (exp (- (* (+ t -1.0) (log a)) b))) y) (/ (* x (pow z y)) (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.85e-7) || !(t <= 1.9e-39)) {
tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y;
} else {
tmp = (x * pow(z, y)) / (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 <= (-1.85d-7)) .or. (.not. (t <= 1.9d-39))) then
tmp = (x * exp((((t + (-1.0d0)) * log(a)) - b))) / y
else
tmp = (x * (z ** y)) / (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 <= -1.85e-7) || !(t <= 1.9e-39)) {
tmp = (x * Math.exp((((t + -1.0) * Math.log(a)) - b))) / y;
} else {
tmp = (x * Math.pow(z, y)) / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.85e-7) or not (t <= 1.9e-39): tmp = (x * math.exp((((t + -1.0) * math.log(a)) - b))) / y else: tmp = (x * math.pow(z, y)) / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.85e-7) || !(t <= 1.9e-39)) tmp = Float64(Float64(x * exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b))) / y); else tmp = Float64(Float64(x * (z ^ y)) / 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 <= -1.85e-7) || ~((t <= 1.9e-39))) tmp = (x * exp((((t + -1.0) * log(a)) - b))) / y; else tmp = (x * (z ^ y)) / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.85e-7], N[Not[LessEqual[t, 1.9e-39]], $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[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-7} \lor \neg \left(t \leq 1.9 \cdot 10^{-39}\right):\\
\;\;\;\;\frac{x \cdot e^{\left(t + -1\right) \cdot \log a - b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if t < -1.85000000000000002e-7 or 1.9000000000000001e-39 < t Initial program 100.0%
Taylor expanded in y around 0 93.4%
if -1.85000000000000002e-7 < t < 1.9000000000000001e-39Initial program 97.0%
associate-*l/83.6%
*-commutative83.6%
+-commutative83.6%
associate--l+83.6%
exp-sum83.6%
*-commutative83.6%
exp-to-pow84.2%
sub-neg84.2%
metadata-eval84.2%
exp-diff75.9%
*-commutative75.9%
exp-to-pow75.9%
Simplified75.9%
Taylor expanded in t around 0 87.9%
Final simplification91.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.6e+46) (not (<= y 3.5e+94))) (/ (/ (* x (pow z y)) a) y) (* (/ (pow a (+ t -1.0)) y) (/ x (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.6e+46) || !(y <= 3.5e+94)) {
tmp = ((x * pow(z, y)) / a) / y;
} else {
tmp = (pow(a, (t + -1.0)) / y) * (x / 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.6d+46)) .or. (.not. (y <= 3.5d+94))) then
tmp = ((x * (z ** y)) / a) / y
else
tmp = ((a ** (t + (-1.0d0))) / y) * (x / 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.6e+46) || !(y <= 3.5e+94)) {
tmp = ((x * Math.pow(z, y)) / a) / y;
} else {
tmp = (Math.pow(a, (t + -1.0)) / y) * (x / Math.exp(b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.6e+46) or not (y <= 3.5e+94): tmp = ((x * math.pow(z, y)) / a) / y else: tmp = (math.pow(a, (t + -1.0)) / y) * (x / math.exp(b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.6e+46) || !(y <= 3.5e+94)) tmp = Float64(Float64(Float64(x * (z ^ y)) / a) / y); else tmp = Float64(Float64((a ^ Float64(t + -1.0)) / y) * Float64(x / exp(b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.6e+46) || ~((y <= 3.5e+94))) tmp = ((x * (z ^ y)) / a) / y; else tmp = ((a ^ (t + -1.0)) / y) * (x / exp(b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.6e+46], N[Not[LessEqual[y, 3.5e+94]], $MachinePrecision]], N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * N[(x / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+46} \lor \neg \left(y \leq 3.5 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{{a}^{\left(t + -1\right)}}{y} \cdot \frac{x}{e^{b}}\\
\end{array}
\end{array}
if y < -1.5999999999999999e46 or 3.4999999999999997e94 < y Initial program 100.0%
associate-*l/81.6%
*-commutative81.6%
+-commutative81.6%
associate--l+81.6%
exp-sum60.2%
*-commutative60.2%
exp-to-pow60.2%
sub-neg60.2%
metadata-eval60.2%
exp-diff46.9%
*-commutative46.9%
exp-to-pow46.9%
Simplified46.9%
Taylor expanded in b around 0 57.2%
Taylor expanded in t around 0 79.9%
if -1.5999999999999999e46 < y < 3.4999999999999997e94Initial program 98.0%
associate-*l/90.1%
*-commutative90.1%
+-commutative90.1%
associate--l+90.1%
exp-sum71.7%
*-commutative71.7%
exp-to-pow72.1%
sub-neg72.1%
metadata-eval72.1%
exp-diff72.1%
*-commutative72.1%
exp-to-pow72.1%
Simplified72.1%
Taylor expanded in y around 0 80.0%
times-frac81.8%
sub-neg81.8%
metadata-eval81.8%
Simplified81.8%
Final simplification81.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (pow a (+ t -1.0)) y)))
(t_2 (/ x (* y (* a (exp b)))))
(t_3 (/ (/ (* x (pow z y)) a) y)))
(if (<= b -8.4e+21)
t_2
(if (<= b -2.6e-69)
t_1
(if (<= b -5.2e-116)
t_3
(if (<= b 7e-236) t_1 (if (<= b 6.6e+20) t_3 t_2)))))))
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 t_2 = x / (y * (a * exp(b)));
double t_3 = ((x * pow(z, y)) / a) / y;
double tmp;
if (b <= -8.4e+21) {
tmp = t_2;
} else if (b <= -2.6e-69) {
tmp = t_1;
} else if (b <= -5.2e-116) {
tmp = t_3;
} else if (b <= 7e-236) {
tmp = t_1;
} else if (b <= 6.6e+20) {
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 * ((a ** (t + (-1.0d0))) / y)
t_2 = x / (y * (a * exp(b)))
t_3 = ((x * (z ** y)) / a) / y
if (b <= (-8.4d+21)) then
tmp = t_2
else if (b <= (-2.6d-69)) then
tmp = t_1
else if (b <= (-5.2d-116)) then
tmp = t_3
else if (b <= 7d-236) then
tmp = t_1
else if (b <= 6.6d+20) 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(a, (t + -1.0)) / y);
double t_2 = x / (y * (a * Math.exp(b)));
double t_3 = ((x * Math.pow(z, y)) / a) / y;
double tmp;
if (b <= -8.4e+21) {
tmp = t_2;
} else if (b <= -2.6e-69) {
tmp = t_1;
} else if (b <= -5.2e-116) {
tmp = t_3;
} else if (b <= 7e-236) {
tmp = t_1;
} else if (b <= 6.6e+20) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (math.pow(a, (t + -1.0)) / y) t_2 = x / (y * (a * math.exp(b))) t_3 = ((x * math.pow(z, y)) / a) / y tmp = 0 if b <= -8.4e+21: tmp = t_2 elif b <= -2.6e-69: tmp = t_1 elif b <= -5.2e-116: tmp = t_3 elif b <= 7e-236: tmp = t_1 elif b <= 6.6e+20: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)) t_2 = Float64(x / Float64(y * Float64(a * exp(b)))) t_3 = Float64(Float64(Float64(x * (z ^ y)) / a) / y) tmp = 0.0 if (b <= -8.4e+21) tmp = t_2; elseif (b <= -2.6e-69) tmp = t_1; elseif (b <= -5.2e-116) tmp = t_3; elseif (b <= 7e-236) tmp = t_1; elseif (b <= 6.6e+20) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * ((a ^ (t + -1.0)) / y); t_2 = x / (y * (a * exp(b))); t_3 = ((x * (z ^ y)) / a) / y; tmp = 0.0; if (b <= -8.4e+21) tmp = t_2; elseif (b <= -2.6e-69) tmp = t_1; elseif (b <= -5.2e-116) tmp = t_3; elseif (b <= 7e-236) tmp = t_1; elseif (b <= 6.6e+20) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[b, -8.4e+21], t$95$2, If[LessEqual[b, -2.6e-69], t$95$1, If[LessEqual[b, -5.2e-116], t$95$3, If[LessEqual[b, 7e-236], t$95$1, If[LessEqual[b, 6.6e+20], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
t_2 := \frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
t_3 := \frac{\frac{x \cdot {z}^{y}}{a}}{y}\\
\mathbf{if}\;b \leq -8.4 \cdot 10^{+21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -5.2 \cdot 10^{-116}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-236}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{+20}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -8.4e21 or 6.6e20 < b Initial program 100.0%
associate-*l/83.2%
*-commutative83.2%
+-commutative83.2%
associate--l+83.2%
exp-sum63.2%
*-commutative63.2%
exp-to-pow63.2%
sub-neg63.2%
metadata-eval63.2%
exp-diff53.6%
*-commutative53.6%
exp-to-pow53.6%
Simplified53.6%
Taylor expanded in t around 0 74.5%
Taylor expanded in y around 0 84.3%
if -8.4e21 < b < -2.6000000000000002e-69 or -5.2000000000000001e-116 < b < 6.99999999999999988e-236Initial program 98.5%
Taylor expanded in y around 0 77.5%
Taylor expanded in b around 0 77.6%
Simplified82.7%
if -2.6000000000000002e-69 < b < -5.2000000000000001e-116 or 6.99999999999999988e-236 < b < 6.6e20Initial program 96.4%
associate-*l/85.8%
*-commutative85.8%
+-commutative85.8%
associate--l+85.8%
exp-sum72.2%
*-commutative72.2%
exp-to-pow72.9%
sub-neg72.9%
metadata-eval72.9%
exp-diff72.9%
*-commutative72.9%
exp-to-pow72.9%
Simplified72.9%
Taylor expanded in b around 0 74.7%
Taylor expanded in t around 0 78.6%
Final simplification82.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8.2e+21) (not (<= b 1.6e+88))) (/ x (* y (* a (exp b)))) (* x (/ (pow a (+ t -1.0)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.2e+21) || !(b <= 1.6e+88)) {
tmp = x / (y * (a * exp(b)));
} else {
tmp = x * (pow(a, (t + -1.0)) / 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 <= (-8.2d+21)) .or. (.not. (b <= 1.6d+88))) then
tmp = x / (y * (a * exp(b)))
else
tmp = x * ((a ** (t + (-1.0d0))) / 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 <= -8.2e+21) || !(b <= 1.6e+88)) {
tmp = x / (y * (a * Math.exp(b)));
} else {
tmp = x * (Math.pow(a, (t + -1.0)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8.2e+21) or not (b <= 1.6e+88): tmp = x / (y * (a * math.exp(b))) else: tmp = x * (math.pow(a, (t + -1.0)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8.2e+21) || !(b <= 1.6e+88)) tmp = Float64(x / Float64(y * Float64(a * exp(b)))); else tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -8.2e+21) || ~((b <= 1.6e+88))) tmp = x / (y * (a * exp(b))); else tmp = x * ((a ^ (t + -1.0)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8.2e+21], N[Not[LessEqual[b, 1.6e+88]], $MachinePrecision]], N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+21} \lor \neg \left(b \leq 1.6 \cdot 10^{+88}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot e^{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\
\end{array}
\end{array}
if b < -8.2e21 or 1.5999999999999999e88 < b Initial program 100.0%
associate-*l/84.3%
*-commutative84.3%
+-commutative84.3%
associate--l+84.3%
exp-sum64.8%
*-commutative64.8%
exp-to-pow64.8%
sub-neg64.8%
metadata-eval64.8%
exp-diff54.6%
*-commutative54.6%
exp-to-pow54.6%
Simplified54.6%
Taylor expanded in t around 0 76.0%
Taylor expanded in y around 0 87.2%
if -8.2e21 < b < 1.5999999999999999e88Initial program 97.8%
Taylor expanded in y around 0 71.7%
Taylor expanded in b around 0 70.6%
Simplified72.9%
Final simplification79.0%
(FPCore (x y z t a b) :precision binary64 (/ x (* y (* a (exp b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * 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 / (y * (a * exp(b)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * (a * Math.exp(b)));
}
def code(x, y, z, t, a, b): return x / (y * (a * math.exp(b)))
function code(x, y, z, t, a, b) return Float64(x / Float64(y * Float64(a * exp(b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * (a * exp(b))); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * N[(a * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot \left(a \cdot e^{b}\right)}
\end{array}
Initial program 98.7%
associate-*l/86.8%
*-commutative86.8%
+-commutative86.8%
associate--l+86.8%
exp-sum67.3%
*-commutative67.3%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
exp-diff62.5%
*-commutative62.5%
exp-to-pow62.5%
Simplified62.5%
Taylor expanded in t around 0 67.3%
Taylor expanded in y around 0 58.2%
Final simplification58.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* y y)))
(t_2 (/ (- (* x y) (* (* y a) (* x (/ b a)))) t_1)))
(if (<= b -3.4e+206)
(/ (* a (/ (* x (- 1.0 b)) y)) (* a a))
(if (<= b -2.6e-17)
(/ (- (* a (/ (* x y) a)) (* y (* x b))) t_1)
(if (<= b -1.65e-68)
t_2
(if (<= b -4.5e-242)
(/ (- (* y (/ x y)) (* a (* b (/ x a)))) (* y a))
(if (<= b 1.1e-301)
(- (* x (/ b (* y a))))
(if (<= b 8.8e-285)
(/ (* x (- a (* (* y a) (/ b y)))) (* y (* a a)))
(if (<= b 6.2e-232) t_2 (/ x (* y (+ a (* a b)))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (y * y);
double t_2 = ((x * y) - ((y * a) * (x * (b / a)))) / t_1;
double tmp;
if (b <= -3.4e+206) {
tmp = (a * ((x * (1.0 - b)) / y)) / (a * a);
} else if (b <= -2.6e-17) {
tmp = ((a * ((x * y) / a)) - (y * (x * b))) / t_1;
} else if (b <= -1.65e-68) {
tmp = t_2;
} else if (b <= -4.5e-242) {
tmp = ((y * (x / y)) - (a * (b * (x / a)))) / (y * a);
} else if (b <= 1.1e-301) {
tmp = -(x * (b / (y * a)));
} else if (b <= 8.8e-285) {
tmp = (x * (a - ((y * a) * (b / y)))) / (y * (a * a));
} else if (b <= 6.2e-232) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * (y * y)
t_2 = ((x * y) - ((y * a) * (x * (b / a)))) / t_1
if (b <= (-3.4d+206)) then
tmp = (a * ((x * (1.0d0 - b)) / y)) / (a * a)
else if (b <= (-2.6d-17)) then
tmp = ((a * ((x * y) / a)) - (y * (x * b))) / t_1
else if (b <= (-1.65d-68)) then
tmp = t_2
else if (b <= (-4.5d-242)) then
tmp = ((y * (x / y)) - (a * (b * (x / a)))) / (y * a)
else if (b <= 1.1d-301) then
tmp = -(x * (b / (y * a)))
else if (b <= 8.8d-285) then
tmp = (x * (a - ((y * a) * (b / y)))) / (y * (a * a))
else if (b <= 6.2d-232) then
tmp = t_2
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 = a * (y * y);
double t_2 = ((x * y) - ((y * a) * (x * (b / a)))) / t_1;
double tmp;
if (b <= -3.4e+206) {
tmp = (a * ((x * (1.0 - b)) / y)) / (a * a);
} else if (b <= -2.6e-17) {
tmp = ((a * ((x * y) / a)) - (y * (x * b))) / t_1;
} else if (b <= -1.65e-68) {
tmp = t_2;
} else if (b <= -4.5e-242) {
tmp = ((y * (x / y)) - (a * (b * (x / a)))) / (y * a);
} else if (b <= 1.1e-301) {
tmp = -(x * (b / (y * a)));
} else if (b <= 8.8e-285) {
tmp = (x * (a - ((y * a) * (b / y)))) / (y * (a * a));
} else if (b <= 6.2e-232) {
tmp = t_2;
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (y * y) t_2 = ((x * y) - ((y * a) * (x * (b / a)))) / t_1 tmp = 0 if b <= -3.4e+206: tmp = (a * ((x * (1.0 - b)) / y)) / (a * a) elif b <= -2.6e-17: tmp = ((a * ((x * y) / a)) - (y * (x * b))) / t_1 elif b <= -1.65e-68: tmp = t_2 elif b <= -4.5e-242: tmp = ((y * (x / y)) - (a * (b * (x / a)))) / (y * a) elif b <= 1.1e-301: tmp = -(x * (b / (y * a))) elif b <= 8.8e-285: tmp = (x * (a - ((y * a) * (b / y)))) / (y * (a * a)) elif b <= 6.2e-232: tmp = t_2 else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(y * y)) t_2 = Float64(Float64(Float64(x * y) - Float64(Float64(y * a) * Float64(x * Float64(b / a)))) / t_1) tmp = 0.0 if (b <= -3.4e+206) tmp = Float64(Float64(a * Float64(Float64(x * Float64(1.0 - b)) / y)) / Float64(a * a)); elseif (b <= -2.6e-17) tmp = Float64(Float64(Float64(a * Float64(Float64(x * y) / a)) - Float64(y * Float64(x * b))) / t_1); elseif (b <= -1.65e-68) tmp = t_2; elseif (b <= -4.5e-242) tmp = Float64(Float64(Float64(y * Float64(x / y)) - Float64(a * Float64(b * Float64(x / a)))) / Float64(y * a)); elseif (b <= 1.1e-301) tmp = Float64(-Float64(x * Float64(b / Float64(y * a)))); elseif (b <= 8.8e-285) tmp = Float64(Float64(x * Float64(a - Float64(Float64(y * a) * Float64(b / y)))) / Float64(y * Float64(a * a))); elseif (b <= 6.2e-232) tmp = t_2; 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 = a * (y * y); t_2 = ((x * y) - ((y * a) * (x * (b / a)))) / t_1; tmp = 0.0; if (b <= -3.4e+206) tmp = (a * ((x * (1.0 - b)) / y)) / (a * a); elseif (b <= -2.6e-17) tmp = ((a * ((x * y) / a)) - (y * (x * b))) / t_1; elseif (b <= -1.65e-68) tmp = t_2; elseif (b <= -4.5e-242) tmp = ((y * (x / y)) - (a * (b * (x / a)))) / (y * a); elseif (b <= 1.1e-301) tmp = -(x * (b / (y * a))); elseif (b <= 8.8e-285) tmp = (x * (a - ((y * a) * (b / y)))) / (y * (a * a)); elseif (b <= 6.2e-232) tmp = t_2; else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] - N[(N[(y * a), $MachinePrecision] * N[(x * N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[b, -3.4e+206], N[(N[(a * N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.6e-17], N[(N[(N[(a * N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - N[(y * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[b, -1.65e-68], t$95$2, If[LessEqual[b, -4.5e-242], N[(N[(N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e-301], (-N[(x * N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[b, 8.8e-285], N[(N[(x * N[(a - N[(N[(y * a), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.2e-232], t$95$2, N[(x / N[(y * N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y \cdot y\right)\\
t_2 := \frac{x \cdot y - \left(y \cdot a\right) \cdot \left(x \cdot \frac{b}{a}\right)}{t_1}\\
\mathbf{if}\;b \leq -3.4 \cdot 10^{+206}:\\
\;\;\;\;\frac{a \cdot \frac{x \cdot \left(1 - b\right)}{y}}{a \cdot a}\\
\mathbf{elif}\;b \leq -2.6 \cdot 10^{-17}:\\
\;\;\;\;\frac{a \cdot \frac{x \cdot y}{a} - y \cdot \left(x \cdot b\right)}{t_1}\\
\mathbf{elif}\;b \leq -1.65 \cdot 10^{-68}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -4.5 \cdot 10^{-242}:\\
\;\;\;\;\frac{y \cdot \frac{x}{y} - a \cdot \left(b \cdot \frac{x}{a}\right)}{y \cdot a}\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-301}:\\
\;\;\;\;-x \cdot \frac{b}{y \cdot a}\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{-285}:\\
\;\;\;\;\frac{x \cdot \left(a - \left(y \cdot a\right) \cdot \frac{b}{y}\right)}{y \cdot \left(a \cdot a\right)}\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{-232}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.39999999999999999e206Initial program 100.0%
associate-*l/85.0%
*-commutative85.0%
+-commutative85.0%
associate--l+85.0%
exp-sum60.0%
*-commutative60.0%
exp-to-pow60.0%
sub-neg60.0%
metadata-eval60.0%
exp-diff45.0%
*-commutative45.0%
exp-to-pow45.0%
Simplified45.0%
Taylor expanded in t around 0 70.0%
Taylor expanded in y around 0 95.1%
Taylor expanded in b around 0 65.9%
mul-1-neg65.9%
times-frac61.4%
Simplified61.4%
unsub-neg61.4%
*-commutative61.4%
associate-/r*61.4%
associate-*r/61.4%
frac-sub70.9%
Applied egg-rr70.9%
*-commutative70.9%
distribute-lft-out--70.9%
associate-*l/80.4%
*-commutative80.4%
div-sub80.4%
*-rgt-identity80.4%
distribute-lft-out--80.4%
Simplified80.4%
if -3.39999999999999999e206 < b < -2.60000000000000003e-17Initial program 100.0%
associate-*l/92.3%
*-commutative92.3%
+-commutative92.3%
associate--l+92.3%
exp-sum64.1%
*-commutative64.1%
exp-to-pow64.1%
sub-neg64.1%
metadata-eval64.1%
exp-diff56.4%
*-commutative56.4%
exp-to-pow56.4%
Simplified56.4%
Taylor expanded in t around 0 69.4%
Taylor expanded in y around 0 77.3%
Taylor expanded in b around 0 28.2%
mul-1-neg28.2%
times-frac28.0%
Simplified28.0%
unsub-neg28.0%
associate-/r*28.0%
*-commutative28.0%
frac-times28.2%
frac-sub35.0%
*-commutative35.0%
*-commutative35.0%
Applied egg-rr35.0%
associate-*r*42.7%
associate-*l/42.7%
associate-*r*49.8%
Simplified49.8%
if -2.60000000000000003e-17 < b < -1.6499999999999999e-68 or 8.7999999999999996e-285 < b < 6.1999999999999998e-232Initial program 100.0%
associate-*l/95.8%
*-commutative95.8%
+-commutative95.8%
associate--l+95.8%
exp-sum66.7%
*-commutative66.7%
exp-to-pow66.7%
sub-neg66.7%
metadata-eval66.7%
exp-diff66.7%
*-commutative66.7%
exp-to-pow66.7%
Simplified66.7%
Taylor expanded in t around 0 43.2%
Taylor expanded in y around 0 22.5%
Taylor expanded in b around 0 22.4%
mul-1-neg22.4%
times-frac22.4%
Simplified22.4%
unsub-neg22.4%
associate-*l/22.4%
frac-sub25.8%
*-commutative25.8%
*-commutative25.8%
Applied egg-rr25.8%
*-commutative25.8%
associate-*r/25.8%
*-commutative25.8%
associate-*r/25.8%
*-commutative25.8%
associate-*r*45.9%
Simplified45.9%
if -1.6499999999999999e-68 < b < -4.4999999999999999e-242Initial program 96.7%
associate-*l/82.6%
*-commutative82.6%
+-commutative82.6%
associate--l+82.6%
exp-sum59.3%
*-commutative59.3%
exp-to-pow59.9%
sub-neg59.9%
metadata-eval59.9%
exp-diff59.9%
*-commutative59.9%
exp-to-pow59.9%
Simplified59.9%
Taylor expanded in t around 0 54.1%
Taylor expanded in y around 0 32.4%
Taylor expanded in b around 0 32.4%
mul-1-neg32.4%
times-frac29.4%
Simplified29.4%
unsub-neg29.4%
*-commutative29.4%
associate-/r*26.2%
associate-*l/26.2%
frac-sub35.5%
*-commutative35.5%
Applied egg-rr35.5%
if -4.4999999999999999e-242 < b < 1.1e-301Initial program 99.4%
Taylor expanded in y around 0 75.6%
Taylor expanded in t around 0 31.6%
sub-neg31.6%
mul-1-neg31.6%
distribute-neg-in31.6%
+-commutative31.6%
exp-neg31.6%
associate-*l/31.6%
*-lft-identity31.6%
+-commutative31.6%
exp-sum31.6%
rem-exp-log32.2%
associate-/r*32.2%
Simplified32.2%
Taylor expanded in b around 0 32.2%
+-commutative32.2%
mul-1-neg32.2%
unsub-neg32.2%
*-commutative32.2%
Simplified32.2%
Taylor expanded in b around inf 41.5%
associate-*r/41.5%
mul-1-neg41.5%
distribute-lft-neg-out41.5%
*-commutative41.5%
associate-*r/43.3%
*-commutative43.3%
Simplified43.3%
if 1.1e-301 < b < 8.7999999999999996e-285Initial program 100.0%
associate-*l/100.0%
*-commutative100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum100.0%
*-commutative100.0%
exp-to-pow100.0%
sub-neg100.0%
metadata-eval100.0%
exp-diff100.0%
*-commutative100.0%
exp-to-pow100.0%
Simplified100.0%
Taylor expanded in t around 0 28.8%
Taylor expanded in y around 0 28.8%
Taylor expanded in b around 0 3.8%
mul-1-neg3.8%
times-frac28.8%
Simplified28.8%
unsub-neg28.8%
associate-*r/28.8%
frac-sub100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
*-commutative100.0%
associate-*r*100.0%
distribute-rgt-out--100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
if 6.1999999999999998e-232 < b Initial program 98.2%
associate-*l/82.9%
*-commutative82.9%
+-commutative82.9%
associate--l+82.9%
exp-sum67.7%
*-commutative67.7%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
exp-diff62.2%
*-commutative62.2%
exp-to-pow62.2%
Simplified62.2%
Taylor expanded in t around 0 76.8%
Taylor expanded in y around 0 64.8%
Taylor expanded in b around 0 41.2%
Final simplification46.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -6.6e+205)
(/ (* a (/ (* x (- 1.0 b)) y)) (* a a))
(if (<= b -3.65e+22)
(/ (- (* a (/ (* x y) a)) (* y (* x b))) (* a (* y y)))
(if (<= b -1.18e-147)
(/ (/ (- (/ (* x a) (* x b)) a) (/ (* a a) (* x b))) y)
(if (<= b 6.2e-232)
(- (* x (/ b (* y a))))
(if (<= b 6.6e-173)
(/ x (* y (* a b)))
(/ x (* y (+ a (* a b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.6e+205) {
tmp = (a * ((x * (1.0 - b)) / y)) / (a * a);
} else if (b <= -3.65e+22) {
tmp = ((a * ((x * y) / a)) - (y * (x * b))) / (a * (y * y));
} else if (b <= -1.18e-147) {
tmp = ((((x * a) / (x * b)) - a) / ((a * a) / (x * b))) / y;
} else if (b <= 6.2e-232) {
tmp = -(x * (b / (y * a)));
} else if (b <= 6.6e-173) {
tmp = x / (y * (a * b));
} 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 <= (-6.6d+205)) then
tmp = (a * ((x * (1.0d0 - b)) / y)) / (a * a)
else if (b <= (-3.65d+22)) then
tmp = ((a * ((x * y) / a)) - (y * (x * b))) / (a * (y * y))
else if (b <= (-1.18d-147)) then
tmp = ((((x * a) / (x * b)) - a) / ((a * a) / (x * b))) / y
else if (b <= 6.2d-232) then
tmp = -(x * (b / (y * a)))
else if (b <= 6.6d-173) then
tmp = x / (y * (a * b))
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 <= -6.6e+205) {
tmp = (a * ((x * (1.0 - b)) / y)) / (a * a);
} else if (b <= -3.65e+22) {
tmp = ((a * ((x * y) / a)) - (y * (x * b))) / (a * (y * y));
} else if (b <= -1.18e-147) {
tmp = ((((x * a) / (x * b)) - a) / ((a * a) / (x * b))) / y;
} else if (b <= 6.2e-232) {
tmp = -(x * (b / (y * a)));
} else if (b <= 6.6e-173) {
tmp = x / (y * (a * b));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.6e+205: tmp = (a * ((x * (1.0 - b)) / y)) / (a * a) elif b <= -3.65e+22: tmp = ((a * ((x * y) / a)) - (y * (x * b))) / (a * (y * y)) elif b <= -1.18e-147: tmp = ((((x * a) / (x * b)) - a) / ((a * a) / (x * b))) / y elif b <= 6.2e-232: tmp = -(x * (b / (y * a))) elif b <= 6.6e-173: tmp = x / (y * (a * b)) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.6e+205) tmp = Float64(Float64(a * Float64(Float64(x * Float64(1.0 - b)) / y)) / Float64(a * a)); elseif (b <= -3.65e+22) tmp = Float64(Float64(Float64(a * Float64(Float64(x * y) / a)) - Float64(y * Float64(x * b))) / Float64(a * Float64(y * y))); elseif (b <= -1.18e-147) tmp = Float64(Float64(Float64(Float64(Float64(x * a) / Float64(x * b)) - a) / Float64(Float64(a * a) / Float64(x * b))) / y); elseif (b <= 6.2e-232) tmp = Float64(-Float64(x * Float64(b / Float64(y * a)))); elseif (b <= 6.6e-173) tmp = Float64(x / Float64(y * Float64(a * b))); 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 <= -6.6e+205) tmp = (a * ((x * (1.0 - b)) / y)) / (a * a); elseif (b <= -3.65e+22) tmp = ((a * ((x * y) / a)) - (y * (x * b))) / (a * (y * y)); elseif (b <= -1.18e-147) tmp = ((((x * a) / (x * b)) - a) / ((a * a) / (x * b))) / y; elseif (b <= 6.2e-232) tmp = -(x * (b / (y * a))); elseif (b <= 6.6e-173) tmp = x / (y * (a * b)); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.6e+205], N[(N[(a * N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.65e+22], N[(N[(N[(a * N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - N[(y * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.18e-147], N[(N[(N[(N[(N[(x * a), $MachinePrecision] / N[(x * b), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / N[(N[(a * a), $MachinePrecision] / N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 6.2e-232], (-N[(x * N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[b, 6.6e-173], N[(x / N[(y * N[(a * b), $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.6 \cdot 10^{+205}:\\
\;\;\;\;\frac{a \cdot \frac{x \cdot \left(1 - b\right)}{y}}{a \cdot a}\\
\mathbf{elif}\;b \leq -3.65 \cdot 10^{+22}:\\
\;\;\;\;\frac{a \cdot \frac{x \cdot y}{a} - y \cdot \left(x \cdot b\right)}{a \cdot \left(y \cdot y\right)}\\
\mathbf{elif}\;b \leq -1.18 \cdot 10^{-147}:\\
\;\;\;\;\frac{\frac{\frac{x \cdot a}{x \cdot b} - a}{\frac{a \cdot a}{x \cdot b}}}{y}\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{-232}:\\
\;\;\;\;-x \cdot \frac{b}{y \cdot a}\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{-173}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -6.6000000000000004e205Initial program 100.0%
associate-*l/85.0%
*-commutative85.0%
+-commutative85.0%
associate--l+85.0%
exp-sum60.0%
*-commutative60.0%
exp-to-pow60.0%
sub-neg60.0%
metadata-eval60.0%
exp-diff45.0%
*-commutative45.0%
exp-to-pow45.0%
Simplified45.0%
Taylor expanded in t around 0 70.0%
Taylor expanded in y around 0 95.1%
Taylor expanded in b around 0 65.9%
mul-1-neg65.9%
times-frac61.4%
Simplified61.4%
unsub-neg61.4%
*-commutative61.4%
associate-/r*61.4%
associate-*r/61.4%
frac-sub70.9%
Applied egg-rr70.9%
*-commutative70.9%
distribute-lft-out--70.9%
associate-*l/80.4%
*-commutative80.4%
div-sub80.4%
*-rgt-identity80.4%
distribute-lft-out--80.4%
Simplified80.4%
if -6.6000000000000004e205 < b < -3.6499999999999999e22Initial program 100.0%
associate-*l/90.9%
*-commutative90.9%
+-commutative90.9%
associate--l+90.9%
exp-sum66.7%
*-commutative66.7%
exp-to-pow66.7%
sub-neg66.7%
metadata-eval66.7%
exp-diff60.6%
*-commutative60.6%
exp-to-pow60.6%
Simplified60.6%
Taylor expanded in t around 0 75.9%
Taylor expanded in y around 0 82.1%
Taylor expanded in b around 0 26.8%
mul-1-neg26.8%
times-frac26.5%
Simplified26.5%
unsub-neg26.5%
associate-/r*26.4%
*-commutative26.4%
frac-times26.8%
frac-sub37.8%
*-commutative37.8%
*-commutative37.8%
Applied egg-rr37.8%
associate-*r*43.9%
associate-*l/43.9%
associate-*r*52.3%
Simplified52.3%
if -3.6499999999999999e22 < b < -1.18000000000000003e-147Initial program 100.0%
Taylor expanded in y around 0 65.3%
Taylor expanded in t around 0 20.4%
sub-neg20.4%
mul-1-neg20.4%
distribute-neg-in20.4%
+-commutative20.4%
exp-neg20.4%
associate-*l/20.4%
*-lft-identity20.4%
+-commutative20.4%
exp-sum20.4%
rem-exp-log20.4%
associate-/r*20.4%
Simplified20.4%
Taylor expanded in b around 0 17.3%
+-commutative17.3%
mul-1-neg17.3%
unsub-neg17.3%
*-commutative17.3%
Simplified17.3%
clear-num17.3%
frac-sub19.9%
Applied egg-rr19.9%
associate-*r/26.5%
*-rgt-identity26.5%
associate-*r/30.1%
Simplified30.1%
if -1.18000000000000003e-147 < b < 6.1999999999999998e-232Initial program 98.0%
Taylor expanded in y around 0 77.9%
Taylor expanded in t around 0 30.7%
sub-neg30.7%
mul-1-neg30.7%
distribute-neg-in30.7%
+-commutative30.7%
exp-neg30.7%
associate-*l/30.7%
*-lft-identity30.7%
+-commutative30.7%
exp-sum30.7%
rem-exp-log30.9%
associate-/r*30.9%
Simplified30.9%
Taylor expanded in b around 0 30.9%
+-commutative30.9%
mul-1-neg30.9%
unsub-neg30.9%
*-commutative30.9%
Simplified30.9%
Taylor expanded in b around inf 40.8%
associate-*r/40.8%
mul-1-neg40.8%
distribute-lft-neg-out40.8%
*-commutative40.8%
associate-*r/41.5%
*-commutative41.5%
Simplified41.5%
if 6.1999999999999998e-232 < b < 6.6000000000000006e-173Initial program 99.0%
associate-*l/83.6%
*-commutative83.6%
+-commutative83.6%
associate--l+83.6%
exp-sum68.3%
*-commutative68.3%
exp-to-pow69.2%
sub-neg69.2%
metadata-eval69.2%
exp-diff69.2%
*-commutative69.2%
exp-to-pow69.2%
Simplified69.2%
Taylor expanded in t around 0 77.5%
Taylor expanded in y around 0 24.8%
Taylor expanded in b around 0 24.8%
Taylor expanded in b around inf 39.9%
if 6.6000000000000006e-173 < b Initial program 98.1%
associate-*l/82.8%
*-commutative82.8%
+-commutative82.8%
associate--l+82.8%
exp-sum67.7%
*-commutative67.7%
exp-to-pow67.9%
sub-neg67.9%
metadata-eval67.9%
exp-diff61.3%
*-commutative61.3%
exp-to-pow61.3%
Simplified61.3%
Taylor expanded in t around 0 76.7%
Taylor expanded in y around 0 69.6%
Taylor expanded in b around 0 43.2%
Final simplification45.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -320000000000.0) (+ (/ (* b b) (* y (/ a x))) (/ (- x (* x b)) (* y a))) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -320000000000.0) {
tmp = ((b * b) / (y * (a / x))) + ((x - (x * b)) / (y * a));
} 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 <= (-320000000000.0d0)) then
tmp = ((b * b) / (y * (a / x))) + ((x - (x * b)) / (y * a))
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 <= -320000000000.0) {
tmp = ((b * b) / (y * (a / x))) + ((x - (x * b)) / (y * a));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -320000000000.0: tmp = ((b * b) / (y * (a / x))) + ((x - (x * b)) / (y * a)) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -320000000000.0) tmp = Float64(Float64(Float64(b * b) / Float64(y * Float64(a / x))) + Float64(Float64(x - Float64(x * b)) / Float64(y * a))); 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 <= -320000000000.0) tmp = ((b * b) / (y * (a / x))) + ((x - (x * b)) / (y * a)); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -320000000000.0], N[(N[(N[(b * b), $MachinePrecision] / N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(y * a), $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 -320000000000:\\
\;\;\;\;\frac{b \cdot b}{y \cdot \frac{a}{x}} + \frac{x - x \cdot b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.2e11Initial program 100.0%
associate-*l/89.1%
*-commutative89.1%
+-commutative89.1%
associate--l+89.1%
exp-sum65.5%
*-commutative65.5%
exp-to-pow65.5%
sub-neg65.5%
metadata-eval65.5%
exp-diff56.4%
*-commutative56.4%
exp-to-pow56.4%
Simplified56.4%
Taylor expanded in t around 0 74.6%
Taylor expanded in y around 0 87.5%
Taylor expanded in b around 0 6.5%
Taylor expanded in b around 0 62.7%
*-commutative62.7%
associate-/l*59.1%
unpow259.1%
associate-*r/55.4%
*-commutative55.4%
mul-1-neg55.4%
times-frac55.4%
distribute-lft-neg-in55.4%
cancel-sign-sub-inv55.4%
associate-/r*55.4%
times-frac55.4%
associate-/r*57.2%
div-sub57.2%
*-commutative57.2%
div-sub57.2%
associate-/r*55.4%
*-commutative55.4%
Simplified55.4%
if -3.2e11 < b Initial program 98.4%
associate-*l/86.2%
*-commutative86.2%
+-commutative86.2%
associate--l+86.2%
exp-sum67.8%
*-commutative67.8%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
exp-diff64.2%
*-commutative64.2%
exp-to-pow64.2%
Simplified64.2%
Taylor expanded in t around 0 65.3%
Taylor expanded in y around 0 50.1%
Taylor expanded in b around 0 36.2%
Final simplification40.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.6e-61) (/ (* a (/ (* x (- 1.0 b)) y)) (* a a)) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6e-61) {
tmp = (a * ((x * (1.0 - b)) / y)) / (a * a);
} 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.6d-61)) then
tmp = (a * ((x * (1.0d0 - b)) / y)) / (a * a)
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.6e-61) {
tmp = (a * ((x * (1.0 - b)) / y)) / (a * a);
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.6e-61: tmp = (a * ((x * (1.0 - b)) / y)) / (a * a) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.6e-61) tmp = Float64(Float64(a * Float64(Float64(x * Float64(1.0 - b)) / y)) / Float64(a * a)); 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.6e-61) tmp = (a * ((x * (1.0 - b)) / y)) / (a * a); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.6e-61], N[(N[(a * N[(N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(a * a), $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 -1.6 \cdot 10^{-61}:\\
\;\;\;\;\frac{a \cdot \frac{x \cdot \left(1 - b\right)}{y}}{a \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.6000000000000001e-61Initial program 100.0%
associate-*l/91.2%
*-commutative91.2%
+-commutative91.2%
associate--l+91.2%
exp-sum63.2%
*-commutative63.2%
exp-to-pow63.2%
sub-neg63.2%
metadata-eval63.2%
exp-diff54.4%
*-commutative54.4%
exp-to-pow54.4%
Simplified54.4%
Taylor expanded in t around 0 66.5%
Taylor expanded in y around 0 72.8%
Taylor expanded in b around 0 36.1%
mul-1-neg36.1%
times-frac34.7%
Simplified34.7%
unsub-neg34.7%
*-commutative34.7%
associate-/r*37.3%
associate-*r/43.2%
frac-sub43.7%
Applied egg-rr43.7%
*-commutative43.7%
distribute-lft-out--43.7%
associate-*l/45.1%
*-commutative45.1%
div-sub45.1%
*-rgt-identity45.1%
distribute-lft-out--45.1%
Simplified45.1%
if -1.6000000000000001e-61 < b Initial program 98.3%
associate-*l/85.3%
*-commutative85.3%
+-commutative85.3%
associate--l+85.3%
exp-sum68.8%
*-commutative68.8%
exp-to-pow69.1%
sub-neg69.1%
metadata-eval69.1%
exp-diff65.4%
*-commutative65.4%
exp-to-pow65.4%
Simplified65.4%
Taylor expanded in t around 0 67.6%
Taylor expanded in y around 0 52.8%
Taylor expanded in b around 0 37.9%
Final simplification39.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.05e+145) (/ (/ (* a (* x (- 1.0 b))) (* a a)) y) (if (<= b 6.6e-232) (- (* x (/ b (* y a)))) (/ x (* y (+ a (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+145) {
tmp = ((a * (x * (1.0 - b))) / (a * a)) / y;
} else if (b <= 6.6e-232) {
tmp = -(x * (b / (y * a)));
} 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.05d+145)) then
tmp = ((a * (x * (1.0d0 - b))) / (a * a)) / y
else if (b <= 6.6d-232) then
tmp = -(x * (b / (y * a)))
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.05e+145) {
tmp = ((a * (x * (1.0 - b))) / (a * a)) / y;
} else if (b <= 6.6e-232) {
tmp = -(x * (b / (y * a)));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.05e+145: tmp = ((a * (x * (1.0 - b))) / (a * a)) / y elif b <= 6.6e-232: tmp = -(x * (b / (y * a))) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.05e+145) tmp = Float64(Float64(Float64(a * Float64(x * Float64(1.0 - b))) / Float64(a * a)) / y); elseif (b <= 6.6e-232) tmp = Float64(-Float64(x * Float64(b / Float64(y * a)))); 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.05e+145) tmp = ((a * (x * (1.0 - b))) / (a * a)) / y; elseif (b <= 6.6e-232) tmp = -(x * (b / (y * a))); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.05e+145], N[(N[(N[(a * N[(x * N[(1.0 - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 6.6e-232], (-N[(x * N[(b / N[(y * a), $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 -1.05 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{a \cdot \left(x \cdot \left(1 - b\right)\right)}{a \cdot a}}{y}\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{-232}:\\
\;\;\;\;-x \cdot \frac{b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < -1.04999999999999995e145Initial program 100.0%
Taylor expanded in y around 0 96.6%
Taylor expanded in t around 0 93.2%
sub-neg93.2%
mul-1-neg93.2%
distribute-neg-in93.2%
+-commutative93.2%
exp-neg93.2%
associate-*l/93.2%
*-lft-identity93.2%
+-commutative93.2%
exp-sum93.2%
rem-exp-log93.2%
associate-/r*72.5%
Simplified72.5%
Taylor expanded in b around 0 60.0%
+-commutative60.0%
mul-1-neg60.0%
unsub-neg60.0%
*-commutative60.0%
Simplified60.0%
frac-sub69.3%
div-inv69.3%
Applied egg-rr69.3%
associate-*r/69.3%
*-rgt-identity69.3%
*-commutative69.3%
distribute-rgt-out--69.3%
*-rgt-identity69.3%
distribute-lft-out--69.3%
Simplified69.3%
if -1.04999999999999995e145 < b < 6.5999999999999997e-232Initial program 99.0%
Taylor expanded in y around 0 75.9%
Taylor expanded in t around 0 38.9%
sub-neg38.9%
mul-1-neg38.9%
distribute-neg-in38.9%
+-commutative38.9%
exp-neg38.9%
associate-*l/38.9%
*-lft-identity38.9%
+-commutative38.9%
exp-sum38.9%
rem-exp-log39.0%
associate-/r*35.2%
Simplified35.2%
Taylor expanded in b around 0 25.7%
+-commutative25.7%
mul-1-neg25.7%
unsub-neg25.7%
*-commutative25.7%
Simplified25.7%
Taylor expanded in b around inf 30.8%
associate-*r/30.8%
mul-1-neg30.8%
distribute-lft-neg-out30.8%
*-commutative30.8%
associate-*r/34.7%
*-commutative34.7%
Simplified34.7%
if 6.5999999999999997e-232 < b Initial program 98.2%
associate-*l/82.9%
*-commutative82.9%
+-commutative82.9%
associate--l+82.9%
exp-sum67.7%
*-commutative67.7%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
exp-diff62.2%
*-commutative62.2%
exp-to-pow62.2%
Simplified62.2%
Taylor expanded in t around 0 76.8%
Taylor expanded in y around 0 64.8%
Taylor expanded in b around 0 41.2%
Final simplification41.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 2.6e-231) (- (* x (/ b (* y a)))) (if (<= b 2.1e-10) (/ x (* y a)) (/ x (* y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.6e-231) {
tmp = -(x * (b / (y * a)));
} else if (b <= 2.1e-10) {
tmp = x / (y * a);
} 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 <= 2.6d-231) then
tmp = -(x * (b / (y * a)))
else if (b <= 2.1d-10) then
tmp = x / (y * a)
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 <= 2.6e-231) {
tmp = -(x * (b / (y * a)));
} else if (b <= 2.1e-10) {
tmp = x / (y * a);
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 2.6e-231: tmp = -(x * (b / (y * a))) elif b <= 2.1e-10: tmp = x / (y * a) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.6e-231) tmp = Float64(-Float64(x * Float64(b / Float64(y * a)))); elseif (b <= 2.1e-10) tmp = Float64(x / Float64(y * a)); 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 <= 2.6e-231) tmp = -(x * (b / (y * a))); elseif (b <= 2.1e-10) tmp = x / (y * a); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.6e-231], (-N[(x * N[(b / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[b, 2.1e-10], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.6 \cdot 10^{-231}:\\
\;\;\;\;-x \cdot \frac{b}{y \cdot a}\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.60000000000000003e-231Initial program 99.2%
Taylor expanded in y around 0 80.3%
Taylor expanded in t around 0 50.4%
sub-neg50.4%
mul-1-neg50.4%
distribute-neg-in50.4%
+-commutative50.4%
exp-neg50.4%
associate-*l/50.4%
*-lft-identity50.4%
+-commutative50.4%
exp-sum50.4%
rem-exp-log50.4%
associate-/r*43.1%
Simplified43.1%
Taylor expanded in b around 0 32.9%
+-commutative32.9%
mul-1-neg32.9%
unsub-neg32.9%
*-commutative32.9%
Simplified32.9%
Taylor expanded in b around inf 36.2%
associate-*r/36.2%
mul-1-neg36.2%
distribute-lft-neg-out36.2%
*-commutative36.2%
associate-*r/38.6%
*-commutative38.6%
Simplified38.6%
if 2.60000000000000003e-231 < b < 2.1e-10Initial program 95.2%
associate-*l/90.0%
*-commutative90.0%
+-commutative90.0%
associate--l+90.0%
exp-sum76.4%
*-commutative76.4%
exp-to-pow77.3%
sub-neg77.3%
metadata-eval77.3%
exp-diff77.3%
*-commutative77.3%
exp-to-pow77.3%
Simplified77.3%
Taylor expanded in t around 0 80.0%
Taylor expanded in y around 0 38.1%
Taylor expanded in b around 0 37.4%
if 2.1e-10 < b Initial program 100.0%
associate-*l/78.7%
*-commutative78.7%
+-commutative78.7%
associate--l+78.7%
exp-sum62.7%
*-commutative62.7%
exp-to-pow62.7%
sub-neg62.7%
metadata-eval62.7%
exp-diff53.3%
*-commutative53.3%
exp-to-pow53.3%
Simplified53.3%
Taylor expanded in t around 0 74.8%
Taylor expanded in y around 0 80.4%
Taylor expanded in b around 0 43.0%
Taylor expanded in b around inf 43.0%
Final simplification39.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.22e-231) (- (* x (/ b (* y a)))) (/ x (* y (+ a (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.22e-231) {
tmp = -(x * (b / (y * a)));
} 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.22d-231) then
tmp = -(x * (b / (y * a)))
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.22e-231) {
tmp = -(x * (b / (y * a)));
} else {
tmp = x / (y * (a + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.22e-231: tmp = -(x * (b / (y * a))) else: tmp = x / (y * (a + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.22e-231) tmp = Float64(-Float64(x * Float64(b / Float64(y * a)))); 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.22e-231) tmp = -(x * (b / (y * a))); else tmp = x / (y * (a + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.22e-231], (-N[(x * N[(b / N[(y * a), $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 1.22 \cdot 10^{-231}:\\
\;\;\;\;-x \cdot \frac{b}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a + a \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.22e-231Initial program 99.2%
Taylor expanded in y around 0 80.3%
Taylor expanded in t around 0 50.4%
sub-neg50.4%
mul-1-neg50.4%
distribute-neg-in50.4%
+-commutative50.4%
exp-neg50.4%
associate-*l/50.4%
*-lft-identity50.4%
+-commutative50.4%
exp-sum50.4%
rem-exp-log50.4%
associate-/r*43.1%
Simplified43.1%
Taylor expanded in b around 0 32.9%
+-commutative32.9%
mul-1-neg32.9%
unsub-neg32.9%
*-commutative32.9%
Simplified32.9%
Taylor expanded in b around inf 36.2%
associate-*r/36.2%
mul-1-neg36.2%
distribute-lft-neg-out36.2%
*-commutative36.2%
associate-*r/38.6%
*-commutative38.6%
Simplified38.6%
if 1.22e-231 < b Initial program 98.2%
associate-*l/82.9%
*-commutative82.9%
+-commutative82.9%
associate--l+82.9%
exp-sum67.7%
*-commutative67.7%
exp-to-pow68.1%
sub-neg68.1%
metadata-eval68.1%
exp-diff62.2%
*-commutative62.2%
exp-to-pow62.2%
Simplified62.2%
Taylor expanded in t around 0 76.8%
Taylor expanded in y around 0 64.8%
Taylor expanded in b around 0 41.2%
Final simplification39.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.15e+92) (* x (/ 1.0 (* y a))) (/ x (* a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.15e+92) {
tmp = x * (1.0 / (y * a));
} 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 <= 1.15d+92) then
tmp = x * (1.0d0 / (y * a))
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 <= 1.15e+92) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / (a * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.15e+92: tmp = x * (1.0 / (y * a)) else: tmp = x / (a * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.15e+92) tmp = Float64(x * Float64(1.0 / Float64(y * a))); 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 <= 1.15e+92) tmp = x * (1.0 / (y * a)); else tmp = x / (a * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.15e+92], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.15 \cdot 10^{+92}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.14999999999999999e92Initial program 98.4%
Taylor expanded in y around 0 76.9%
Taylor expanded in b around 0 64.0%
Simplified65.2%
Taylor expanded in t around 0 31.6%
if 1.14999999999999999e92 < b Initial program 100.0%
associate-*l/79.6%
*-commutative79.6%
+-commutative79.6%
associate--l+79.6%
exp-sum64.8%
*-commutative64.8%
exp-to-pow64.8%
sub-neg64.8%
metadata-eval64.8%
exp-diff53.7%
*-commutative53.7%
exp-to-pow53.7%
Simplified53.7%
Taylor expanded in t around 0 77.9%
Taylor expanded in y around 0 87.2%
Taylor expanded in b around 0 44.3%
Taylor expanded in b around inf 39.1%
Final simplification33.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1.3e-9) (* x (/ 1.0 (* y a))) (/ x (* y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1.3e-9) {
tmp = x * (1.0 / (y * a));
} 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 <= 1.3d-9) then
tmp = x * (1.0d0 / (y * a))
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 <= 1.3e-9) {
tmp = x * (1.0 / (y * a));
} else {
tmp = x / (y * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 1.3e-9: tmp = x * (1.0 / (y * a)) else: tmp = x / (y * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1.3e-9) tmp = Float64(x * Float64(1.0 / Float64(y * a))); 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 <= 1.3e-9) tmp = x * (1.0 / (y * a)); else tmp = x / (y * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.3e-9], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.3 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(a \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.3000000000000001e-9Initial program 98.2%
Taylor expanded in y around 0 75.8%
Taylor expanded in b around 0 62.5%
Simplified64.9%
Taylor expanded in t around 0 31.7%
if 1.3000000000000001e-9 < b Initial program 100.0%
associate-*l/78.7%
*-commutative78.7%
+-commutative78.7%
associate--l+78.7%
exp-sum62.7%
*-commutative62.7%
exp-to-pow62.7%
sub-neg62.7%
metadata-eval62.7%
exp-diff53.3%
*-commutative53.3%
exp-to-pow53.3%
Simplified53.3%
Taylor expanded in t around 0 74.8%
Taylor expanded in y around 0 80.4%
Taylor expanded in b around 0 43.0%
Taylor expanded in b around inf 43.0%
Final simplification35.0%
(FPCore (x y z t a b) :precision binary64 (* x (/ 1.0 (* y a))))
double code(double x, double y, double z, double t, double a, double b) {
return x * (1.0 / (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 * (1.0d0 / (y * a))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * (1.0 / (y * a));
}
def code(x, y, z, t, a, b): return x * (1.0 / (y * a))
function code(x, y, z, t, a, b) return Float64(x * Float64(1.0 / Float64(y * a))) end
function tmp = code(x, y, z, t, a, b) tmp = x * (1.0 / (y * a)); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{1}{y \cdot a}
\end{array}
Initial program 98.7%
Taylor expanded in y around 0 81.0%
Taylor expanded in b around 0 59.8%
Simplified60.8%
Taylor expanded in t around 0 29.2%
Final simplification29.2%
(FPCore (x y z t a b) :precision binary64 (/ x (* y a)))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / (y * a)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / (y * a);
}
def code(x, y, z, t, a, b): return x / (y * a)
function code(x, y, z, t, a, b) return Float64(x / Float64(y * a)) end
function tmp = code(x, y, z, t, a, b) tmp = x / (y * a); end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot a}
\end{array}
Initial program 98.7%
associate-*l/86.8%
*-commutative86.8%
+-commutative86.8%
associate--l+86.8%
exp-sum67.3%
*-commutative67.3%
exp-to-pow67.6%
sub-neg67.6%
metadata-eval67.6%
exp-diff62.5%
*-commutative62.5%
exp-to-pow62.5%
Simplified62.5%
Taylor expanded in t around 0 67.3%
Taylor expanded in y around 0 58.2%
Taylor expanded in b around 0 28.9%
Final simplification28.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (pow a (- t 1.0)))
(t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
(if (< t -0.8845848504127471)
t_2
(if (< t 852031.2288374073)
(/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a ** (t - 1.0d0)
t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
if (t < (-0.8845848504127471d0)) then
tmp = t_2
else if (t < 852031.2288374073d0) then
tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.pow(a, (t - 1.0));
double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
double tmp;
if (t < -0.8845848504127471) {
tmp = t_2;
} else if (t < 852031.2288374073) {
tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.pow(a, (t - 1.0)) t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z))) tmp = 0 if t < -0.8845848504127471: tmp = t_2 elif t < 852031.2288374073: tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = a ^ Float64(t - 1.0) t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z)))) tmp = 0.0 if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a ^ (t - 1.0); t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z))); tmp = 0.0; if (t < -0.8845848504127471) tmp = t_2; elseif (t < 852031.2288374073) tmp = ((x / y) * t_1) / exp((b - (log(z) * y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t_1}{e^{b - \log z \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023279
(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))