
(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 17 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 (/ y (exp (- (fma y (log z) (* (log a) (+ t -1.0))) b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x / (y / exp((fma(y, log(z), (log(a) * (t + -1.0))) - b)));
}
function code(x, y, z, t, a, b) return Float64(x / Float64(y / exp(Float64(fma(y, log(z), Float64(log(a) * Float64(t + -1.0))) - b)))) end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(y / N[Exp[N[(N[(y * N[Log[z], $MachinePrecision] + N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{y}{e^{\mathsf{fma}\left(y, \log z, \log a \cdot \left(t + -1\right)\right) - b}}}
\end{array}
Initial program 98.3%
associate-/l*98.7%
fma-def98.7%
sub-neg98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -5e+67) (not (<= (+ t -1.0) 2e+61))) (/ x (/ y (exp (- (* (log a) (+ t -1.0)) b)))) (/ (* 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) <= -5e+67) || !((t + -1.0) <= 2e+61)) {
tmp = x / (y / exp(((log(a) * (t + -1.0)) - b)));
} 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)) <= (-5d+67)) .or. (.not. ((t + (-1.0d0)) <= 2d+61))) then
tmp = x / (y / exp(((log(a) * (t + (-1.0d0))) - b)))
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) <= -5e+67) || !((t + -1.0) <= 2e+61)) {
tmp = x / (y / Math.exp(((Math.log(a) * (t + -1.0)) - b)));
} 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) <= -5e+67) or not ((t + -1.0) <= 2e+61): tmp = x / (y / math.exp(((math.log(a) * (t + -1.0)) - b))) 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) <= -5e+67) || !(Float64(t + -1.0) <= 2e+61)) tmp = Float64(x / Float64(y / exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b)))); 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) <= -5e+67) || ~(((t + -1.0) <= 2e+61))) tmp = x / (y / exp(((log(a) * (t + -1.0)) - b))); 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], -5e+67], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+61]], $MachinePrecision]], N[(x / N[(y / N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $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 -5 \cdot 10^{+67} \lor \neg \left(t + -1 \leq 2 \cdot 10^{+61}\right):\\
\;\;\;\;\frac{x}{\frac{y}{e^{\log a \cdot \left(t + -1\right) - b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z - \log a\right) - b}}{y}\\
\end{array}
\end{array}
if (-.f64 t 1) < -4.99999999999999976e67 or 1.9999999999999999e61 < (-.f64 t 1) Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 95.9%
if -4.99999999999999976e67 < (-.f64 t 1) < 1.9999999999999999e61Initial program 97.4%
Taylor expanded in t around 0 96.0%
+-commutative96.0%
mul-1-neg96.0%
unsub-neg96.0%
Simplified96.0%
Final simplification95.9%
(FPCore (x y z t a b) :precision binary64 (/ (* x (exp (- (+ (* y (log z)) (* (log a) (+ t -1.0))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
return (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - 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)) + (log(a) * (t + (-1.0d0)))) - 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)) + (Math.log(a) * (t + -1.0))) - b))) / y;
}
def code(x, y, z, t, a, b): return (x * math.exp((((y * math.log(z)) + (math.log(a) * (t + -1.0))) - b))) / y
function code(x, y, z, t, a, b) return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(log(a) * Float64(t + -1.0))) - b))) / y) end
function tmp = code(x, y, z, t, a, b) tmp = (x * exp((((y * log(z)) + (log(a) * (t + -1.0))) - 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[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot e^{\left(y \cdot \log z + \log a \cdot \left(t + -1\right)\right) - b}}{y}
\end{array}
Initial program 98.3%
Final simplification98.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -5e+55) (not (<= (+ t -1.0) 2e+79))) (/ x (/ y (/ (pow a t) a))) (/ x (/ a (/ (pow z y) (* y (exp b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -5e+55) || !((t + -1.0) <= 2e+79)) {
tmp = x / (y / (pow(a, t) / a));
} else {
tmp = x / (a / (pow(z, y) / (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)) <= (-5d+55)) .or. (.not. ((t + (-1.0d0)) <= 2d+79))) then
tmp = x / (y / ((a ** t) / a))
else
tmp = x / (a / ((z ** y) / (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) <= -5e+55) || !((t + -1.0) <= 2e+79)) {
tmp = x / (y / (Math.pow(a, t) / a));
} else {
tmp = x / (a / (Math.pow(z, y) / (y * Math.exp(b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -5e+55) or not ((t + -1.0) <= 2e+79): tmp = x / (y / (math.pow(a, t) / a)) else: tmp = x / (a / (math.pow(z, y) / (y * math.exp(b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -5e+55) || !(Float64(t + -1.0) <= 2e+79)) tmp = Float64(x / Float64(y / Float64((a ^ t) / a))); else tmp = Float64(x / Float64(a / Float64((z ^ y) / 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) <= -5e+55) || ~(((t + -1.0) <= 2e+79))) tmp = x / (y / ((a ^ t) / a)); else tmp = x / (a / ((z ^ y) / (y * exp(b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -5e+55], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 2e+79]], $MachinePrecision]], N[(x / N[(y / N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a / N[(N[Power[z, y], $MachinePrecision] / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -5 \cdot 10^{+55} \lor \neg \left(t + -1 \leq 2 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{\frac{{z}^{y}}{y \cdot e^{b}}}}\\
\end{array}
\end{array}
if (-.f64 t 1) < -5.00000000000000046e55 or 1.99999999999999993e79 < (-.f64 t 1) Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 93.8%
exp-diff85.5%
exp-to-pow85.5%
sub-neg85.5%
metadata-eval85.5%
Simplified85.5%
unpow-prod-up85.5%
unpow-185.5%
Applied egg-rr85.5%
associate-*r/85.5%
*-rgt-identity85.5%
Simplified85.5%
Taylor expanded in b around 0 92.8%
if -5.00000000000000046e55 < (-.f64 t 1) < 1.99999999999999993e79Initial program 97.3%
associate-/l*97.9%
associate--l+97.9%
exp-sum82.9%
associate-/r*82.9%
*-commutative82.9%
exp-to-pow82.9%
exp-diff78.5%
*-commutative78.5%
exp-to-pow79.3%
sub-neg79.3%
metadata-eval79.3%
Simplified79.3%
Taylor expanded in t around 0 82.5%
associate-/l*84.3%
Simplified84.3%
Final simplification87.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8e+16) (not (<= y 2.65e+95))) (/ (* x (/ (pow z y) a)) y) (/ x (/ y (exp (- (* (log a) (+ t -1.0)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8e+16) || !(y <= 2.65e+95)) {
tmp = (x * (pow(z, y) / a)) / y;
} else {
tmp = x / (y / exp(((log(a) * (t + -1.0)) - 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 <= (-8d+16)) .or. (.not. (y <= 2.65d+95))) then
tmp = (x * ((z ** y) / a)) / y
else
tmp = x / (y / exp(((log(a) * (t + (-1.0d0))) - 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 <= -8e+16) || !(y <= 2.65e+95)) {
tmp = (x * (Math.pow(z, y) / a)) / y;
} else {
tmp = x / (y / Math.exp(((Math.log(a) * (t + -1.0)) - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8e+16) or not (y <= 2.65e+95): tmp = (x * (math.pow(z, y) / a)) / y else: tmp = x / (y / math.exp(((math.log(a) * (t + -1.0)) - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8e+16) || !(y <= 2.65e+95)) tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y); else tmp = Float64(x / Float64(y / exp(Float64(Float64(log(a) * Float64(t + -1.0)) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8e+16) || ~((y <= 2.65e+95))) tmp = (x * ((z ^ y) / a)) / y; else tmp = x / (y / exp(((log(a) * (t + -1.0)) - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8e+16], N[Not[LessEqual[y, 2.65e+95]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y / N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+16} \lor \neg \left(y \leq 2.65 \cdot 10^{+95}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{e^{\log a \cdot \left(t + -1\right) - b}}}\\
\end{array}
\end{array}
if y < -8e16 or 2.6500000000000001e95 < y Initial program 100.0%
Taylor expanded in t around 0 91.2%
+-commutative91.2%
mul-1-neg91.2%
unsub-neg91.2%
Simplified91.2%
Taylor expanded in b around 0 81.5%
*-commutative81.5%
exp-diff81.5%
*-commutative81.5%
exp-to-pow81.5%
rem-exp-log81.5%
Simplified81.5%
if -8e16 < y < 2.6500000000000001e95Initial program 97.2%
associate-/l*97.9%
fma-def97.9%
sub-neg97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in y around 0 96.0%
Final simplification90.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ t -1.0) -5e+55) (not (<= (+ t -1.0) 4e+105))) (/ x (/ y (/ (pow a t) a))) (/ x (* a (* y (exp b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((t + -1.0) <= -5e+55) || !((t + -1.0) <= 4e+105)) {
tmp = x / (y / (pow(a, t) / a));
} 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 + (-1.0d0)) <= (-5d+55)) .or. (.not. ((t + (-1.0d0)) <= 4d+105))) then
tmp = x / (y / ((a ** t) / a))
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 + -1.0) <= -5e+55) || !((t + -1.0) <= 4e+105)) {
tmp = x / (y / (Math.pow(a, t) / a));
} else {
tmp = x / (a * (y * Math.exp(b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((t + -1.0) <= -5e+55) or not ((t + -1.0) <= 4e+105): tmp = x / (y / (math.pow(a, t) / a)) else: tmp = x / (a * (y * math.exp(b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(t + -1.0) <= -5e+55) || !(Float64(t + -1.0) <= 4e+105)) tmp = Float64(x / Float64(y / Float64((a ^ t) / a))); 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 + -1.0) <= -5e+55) || ~(((t + -1.0) <= 4e+105))) tmp = x / (y / ((a ^ t) / a)); else tmp = x / (a * (y * exp(b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t + -1.0), $MachinePrecision], -5e+55], N[Not[LessEqual[N[(t + -1.0), $MachinePrecision], 4e+105]], $MachinePrecision]], N[(x / N[(y / N[(N[Power[a, t], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t + -1 \leq -5 \cdot 10^{+55} \lor \neg \left(t + -1 \leq 4 \cdot 10^{+105}\right):\\
\;\;\;\;\frac{x}{\frac{y}{\frac{{a}^{t}}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot e^{b}\right)}\\
\end{array}
\end{array}
if (-.f64 t 1) < -5.00000000000000046e55 or 3.9999999999999998e105 < (-.f64 t 1) Initial program 100.0%
associate-/l*100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 94.7%
exp-diff87.0%
exp-to-pow87.0%
sub-neg87.0%
metadata-eval87.0%
Simplified87.0%
unpow-prod-up87.0%
unpow-187.0%
Applied egg-rr87.0%
associate-*r/87.0%
*-rgt-identity87.0%
Simplified87.0%
Taylor expanded in b around 0 94.7%
if -5.00000000000000046e55 < (-.f64 t 1) < 3.9999999999999998e105Initial program 97.4%
associate-/l*98.0%
associate--l+98.0%
exp-sum81.5%
associate-/r*81.5%
*-commutative81.5%
exp-to-pow81.5%
exp-diff77.2%
*-commutative77.2%
exp-to-pow78.0%
sub-neg78.0%
metadata-eval78.0%
Simplified78.0%
Taylor expanded in t around 0 81.1%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in y around 0 72.1%
Final simplification80.2%
(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.3%
associate-/l*98.7%
associate--l+98.7%
exp-sum80.0%
associate-/r*80.0%
*-commutative80.0%
exp-to-pow80.0%
exp-diff75.7%
*-commutative75.7%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
Simplified76.1%
Taylor expanded in t around 0 67.2%
associate-/l*69.5%
Simplified69.5%
Taylor expanded in y around 0 62.3%
Final simplification62.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -9.5e+133)
(/ (/ (* x (- b)) a) y)
(if (<= b 4.8e-244)
(* x (/ 1.0 (* y a)))
(if (<= b 8.5e+190)
(/ (/ x (+ a (* a b))) y)
(* (/ 1.0 a) (/ x (* y (+ b 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.5e+133) {
tmp = ((x * -b) / a) / y;
} else if (b <= 4.8e-244) {
tmp = x * (1.0 / (y * a));
} else if (b <= 8.5e+190) {
tmp = (x / (a + (a * b))) / y;
} else {
tmp = (1.0 / a) * (x / (y * (b + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-9.5d+133)) then
tmp = ((x * -b) / a) / y
else if (b <= 4.8d-244) then
tmp = x * (1.0d0 / (y * a))
else if (b <= 8.5d+190) then
tmp = (x / (a + (a * b))) / y
else
tmp = (1.0d0 / a) * (x / (y * (b + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.5e+133) {
tmp = ((x * -b) / a) / y;
} else if (b <= 4.8e-244) {
tmp = x * (1.0 / (y * a));
} else if (b <= 8.5e+190) {
tmp = (x / (a + (a * b))) / y;
} else {
tmp = (1.0 / a) * (x / (y * (b + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9.5e+133: tmp = ((x * -b) / a) / y elif b <= 4.8e-244: tmp = x * (1.0 / (y * a)) elif b <= 8.5e+190: tmp = (x / (a + (a * b))) / y else: tmp = (1.0 / a) * (x / (y * (b + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.5e+133) tmp = Float64(Float64(Float64(x * Float64(-b)) / a) / y); elseif (b <= 4.8e-244) tmp = Float64(x * Float64(1.0 / Float64(y * a))); elseif (b <= 8.5e+190) tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); else tmp = Float64(Float64(1.0 / a) * Float64(x / Float64(y * Float64(b + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9.5e+133) tmp = ((x * -b) / a) / y; elseif (b <= 4.8e-244) tmp = x * (1.0 / (y * a)); elseif (b <= 8.5e+190) tmp = (x / (a + (a * b))) / y; else tmp = (1.0 / a) * (x / (y * (b + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.5e+133], N[(N[(N[(x * (-b)), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 4.8e-244], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e+190], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(1.0 / a), $MachinePrecision] * N[(x / N[(y * N[(b + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+133}:\\
\;\;\;\;\frac{\frac{x \cdot \left(-b\right)}{a}}{y}\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{-244}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+190}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x}{y \cdot \left(b + 1\right)}\\
\end{array}
\end{array}
if b < -9.49999999999999996e133Initial program 100.0%
Taylor expanded in y around 0 97.3%
exp-diff77.8%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in t around 0 94.5%
Taylor expanded in b around 0 57.4%
+-commutative57.4%
mul-1-neg57.4%
unsub-neg57.4%
associate-/l*46.7%
Simplified46.7%
Taylor expanded in b around inf 57.4%
if -9.49999999999999996e133 < b < 4.80000000000000032e-244Initial program 96.7%
associate-/l*98.4%
associate--l+98.4%
exp-sum80.8%
associate-/r*80.8%
*-commutative80.8%
exp-to-pow80.8%
exp-diff76.8%
*-commutative76.8%
exp-to-pow77.3%
sub-neg77.3%
metadata-eval77.3%
Simplified77.3%
Taylor expanded in t around 0 59.8%
associate-/l*61.7%
Simplified61.7%
Taylor expanded in y around 0 50.7%
Taylor expanded in b around 0 39.4%
div-inv41.3%
Applied egg-rr41.3%
if 4.80000000000000032e-244 < b < 8.50000000000000022e190Initial program 99.0%
Taylor expanded in y around 0 77.2%
exp-diff75.1%
exp-to-pow75.9%
sub-neg75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in t around 0 57.1%
Taylor expanded in b around 0 39.6%
if 8.50000000000000022e190 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum70.8%
associate-/r*70.8%
*-commutative70.8%
exp-to-pow70.8%
exp-diff70.8%
*-commutative70.8%
exp-to-pow70.8%
sub-neg70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in t around 0 70.8%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in y around 0 91.8%
Taylor expanded in b around 0 72.0%
distribute-lft-out72.0%
distribute-rgt1-in72.0%
Simplified72.0%
*-un-lft-identity72.0%
times-frac83.8%
*-commutative83.8%
Applied egg-rr83.8%
Final simplification47.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.5e+128) (/ (/ (* x (- b)) a) y) (if (<= b 4.6e-250) (* x (/ 1.0 (* y a))) (/ (/ x (+ a (* a b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.5e+128) {
tmp = ((x * -b) / a) / y;
} else if (b <= 4.6e-250) {
tmp = x * (1.0 / (y * a));
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3.5d+128)) then
tmp = ((x * -b) / a) / y
else if (b <= 4.6d-250) then
tmp = x * (1.0d0 / (y * a))
else
tmp = (x / (a + (a * b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.5e+128) {
tmp = ((x * -b) / a) / y;
} else if (b <= 4.6e-250) {
tmp = x * (1.0 / (y * a));
} else {
tmp = (x / (a + (a * b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.5e+128: tmp = ((x * -b) / a) / y elif b <= 4.6e-250: tmp = x * (1.0 / (y * a)) else: tmp = (x / (a + (a * b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.5e+128) tmp = Float64(Float64(Float64(x * Float64(-b)) / a) / y); elseif (b <= 4.6e-250) tmp = Float64(x * Float64(1.0 / Float64(y * a))); else tmp = Float64(Float64(x / Float64(a + Float64(a * b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.5e+128) tmp = ((x * -b) / a) / y; elseif (b <= 4.6e-250) tmp = x * (1.0 / (y * a)); else tmp = (x / (a + (a * b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.5e+128], N[(N[(N[(x * (-b)), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 4.6e-250], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(a + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+128}:\\
\;\;\;\;\frac{\frac{x \cdot \left(-b\right)}{a}}{y}\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{-250}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a + a \cdot b}}{y}\\
\end{array}
\end{array}
if b < -3.49999999999999969e128Initial program 100.0%
Taylor expanded in y around 0 97.3%
exp-diff77.8%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in t around 0 94.5%
Taylor expanded in b around 0 57.4%
+-commutative57.4%
mul-1-neg57.4%
unsub-neg57.4%
associate-/l*46.7%
Simplified46.7%
Taylor expanded in b around inf 57.4%
if -3.49999999999999969e128 < b < 4.5999999999999999e-250Initial program 96.7%
associate-/l*98.4%
associate--l+98.4%
exp-sum80.8%
associate-/r*80.8%
*-commutative80.8%
exp-to-pow80.8%
exp-diff76.8%
*-commutative76.8%
exp-to-pow77.3%
sub-neg77.3%
metadata-eval77.3%
Simplified77.3%
Taylor expanded in t around 0 59.8%
associate-/l*61.7%
Simplified61.7%
Taylor expanded in y around 0 50.7%
Taylor expanded in b around 0 39.4%
div-inv41.3%
Applied egg-rr41.3%
if 4.5999999999999999e-250 < b Initial program 99.2%
Taylor expanded in y around 0 80.2%
exp-diff76.8%
exp-to-pow77.5%
sub-neg77.5%
metadata-eval77.5%
Simplified77.5%
Taylor expanded in t around 0 64.1%
Taylor expanded in b around 0 45.9%
Final simplification45.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.25e+129) (* (/ x y) (/ (- b) a)) (if (<= b 3e+55) (* 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.25e+129) {
tmp = (x / y) * (-b / a);
} else if (b <= 3e+55) {
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.25d+129)) then
tmp = (x / y) * (-b / a)
else if (b <= 3d+55) 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.25e+129) {
tmp = (x / y) * (-b / a);
} else if (b <= 3e+55) {
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.25e+129: tmp = (x / y) * (-b / a) elif b <= 3e+55: 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.25e+129) tmp = Float64(Float64(x / y) * Float64(Float64(-b) / a)); elseif (b <= 3e+55) 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.25e+129) tmp = (x / y) * (-b / a); elseif (b <= 3e+55) 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.25e+129], N[(N[(x / y), $MachinePrecision] * N[((-b) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e+55], 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.25 \cdot 10^{+129}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{-b}{a}\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+55}:\\
\;\;\;\;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.2500000000000001e129Initial program 100.0%
Taylor expanded in y around 0 97.3%
exp-diff77.8%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in t around 0 94.5%
Taylor expanded in b around 0 57.4%
+-commutative57.4%
mul-1-neg57.4%
unsub-neg57.4%
associate-/l*46.7%
Simplified46.7%
Taylor expanded in b around inf 49.3%
mul-1-neg49.3%
times-frac49.3%
distribute-rgt-neg-in49.3%
Simplified49.3%
if -1.2500000000000001e129 < b < 3.00000000000000017e55Initial program 97.5%
associate-/l*98.1%
associate--l+98.1%
exp-sum83.5%
associate-/r*83.5%
*-commutative83.5%
exp-to-pow83.5%
exp-diff80.6%
*-commutative80.6%
exp-to-pow81.3%
sub-neg81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in t around 0 65.1%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in y around 0 48.5%
Taylor expanded in b around 0 40.1%
div-inv41.2%
Applied egg-rr41.2%
if 3.00000000000000017e55 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum72.9%
associate-/r*72.9%
*-commutative72.9%
exp-to-pow72.9%
exp-diff70.8%
*-commutative70.8%
exp-to-pow70.8%
sub-neg70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in t around 0 72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in y around 0 87.7%
Taylor expanded in b around 0 47.5%
distribute-lft-out47.5%
distribute-rgt1-in47.5%
Simplified47.5%
Taylor expanded in b around inf 47.5%
*-commutative47.5%
Simplified47.5%
Final simplification43.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.5e+128) (/ (* x (/ (- b) a)) y) (if (<= b 2.85e+54) (* 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 <= -3.5e+128) {
tmp = (x * (-b / a)) / y;
} else if (b <= 2.85e+54) {
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 <= (-3.5d+128)) then
tmp = (x * (-b / a)) / y
else if (b <= 2.85d+54) 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 <= -3.5e+128) {
tmp = (x * (-b / a)) / y;
} else if (b <= 2.85e+54) {
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 <= -3.5e+128: tmp = (x * (-b / a)) / y elif b <= 2.85e+54: 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 <= -3.5e+128) tmp = Float64(Float64(x * Float64(Float64(-b) / a)) / y); elseif (b <= 2.85e+54) 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 <= -3.5e+128) tmp = (x * (-b / a)) / y; elseif (b <= 2.85e+54) 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, -3.5e+128], N[(N[(x * N[((-b) / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2.85e+54], 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 -3.5 \cdot 10^{+128}:\\
\;\;\;\;\frac{x \cdot \frac{-b}{a}}{y}\\
\mathbf{elif}\;b \leq 2.85 \cdot 10^{+54}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < -3.49999999999999969e128Initial program 100.0%
Taylor expanded in y around 0 97.3%
exp-diff77.8%
exp-to-pow77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in t around 0 94.5%
Taylor expanded in b around 0 57.4%
+-commutative57.4%
mul-1-neg57.4%
unsub-neg57.4%
associate-/l*46.7%
Simplified46.7%
Taylor expanded in b around inf 57.4%
mul-1-neg57.4%
associate-*l/52.0%
distribute-rgt-neg-out52.0%
Simplified52.0%
if -3.49999999999999969e128 < b < 2.8499999999999998e54Initial program 97.5%
associate-/l*98.1%
associate--l+98.1%
exp-sum83.5%
associate-/r*83.5%
*-commutative83.5%
exp-to-pow83.5%
exp-diff80.6%
*-commutative80.6%
exp-to-pow81.3%
sub-neg81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in t around 0 65.1%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in y around 0 48.5%
Taylor expanded in b around 0 40.1%
div-inv41.2%
Applied egg-rr41.2%
if 2.8499999999999998e54 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum72.9%
associate-/r*72.9%
*-commutative72.9%
exp-to-pow72.9%
exp-diff70.8%
*-commutative70.8%
exp-to-pow70.8%
sub-neg70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in t around 0 72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in y around 0 87.7%
Taylor expanded in b around 0 47.5%
distribute-lft-out47.5%
distribute-rgt1-in47.5%
Simplified47.5%
Taylor expanded in b around inf 47.5%
*-commutative47.5%
Simplified47.5%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.3e-6) (/ (* x (/ (- b) a)) y) (/ x (* a (* y (+ b 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.3e-6) {
tmp = (x * (-b / a)) / y;
} else {
tmp = x / (a * (y * (b + 1.0)));
}
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.3d-6)) then
tmp = (x * (-b / a)) / y
else
tmp = x / (a * (y * (b + 1.0d0)))
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.3e-6) {
tmp = (x * (-b / a)) / y;
} else {
tmp = x / (a * (y * (b + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.3e-6: tmp = (x * (-b / a)) / y else: tmp = x / (a * (y * (b + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.3e-6) tmp = Float64(Float64(x * Float64(Float64(-b) / a)) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(b + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.3e-6) tmp = (x * (-b / a)) / y; else tmp = x / (a * (y * (b + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.3e-6], N[(N[(x * N[((-b) / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(b + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.3 \cdot 10^{-6}:\\
\;\;\;\;\frac{x \cdot \frac{-b}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(b + 1\right)\right)}\\
\end{array}
\end{array}
if b < -3.30000000000000017e-6Initial program 100.0%
Taylor expanded in y around 0 86.9%
exp-diff67.4%
exp-to-pow67.4%
sub-neg67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in t around 0 78.1%
Taylor expanded in b around 0 40.9%
+-commutative40.9%
mul-1-neg40.9%
unsub-neg40.9%
associate-/l*35.2%
Simplified35.2%
Taylor expanded in b around inf 40.9%
mul-1-neg40.9%
associate-*l/38.1%
distribute-rgt-neg-out38.1%
Simplified38.1%
if -3.30000000000000017e-6 < b Initial program 97.7%
associate-/l*98.2%
associate--l+98.2%
exp-sum84.0%
associate-/r*84.0%
*-commutative84.0%
exp-to-pow84.0%
exp-diff82.9%
*-commutative82.9%
exp-to-pow83.5%
sub-neg83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in t around 0 68.2%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in y around 0 56.7%
Taylor expanded in b around 0 41.8%
distribute-lft-out44.5%
distribute-rgt1-in44.5%
Simplified44.5%
Final simplification42.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.5e-5) (/ (/ (* x (- b)) a) y) (/ x (* a (* y (+ b 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.5e-5) {
tmp = ((x * -b) / a) / y;
} else {
tmp = x / (a * (y * (b + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-5.5d-5)) then
tmp = ((x * -b) / a) / y
else
tmp = x / (a * (y * (b + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.5e-5) {
tmp = ((x * -b) / a) / y;
} else {
tmp = x / (a * (y * (b + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.5e-5: tmp = ((x * -b) / a) / y else: tmp = x / (a * (y * (b + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.5e-5) tmp = Float64(Float64(Float64(x * Float64(-b)) / a) / y); else tmp = Float64(x / Float64(a * Float64(y * Float64(b + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.5e-5) tmp = ((x * -b) / a) / y; else tmp = x / (a * (y * (b + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.5e-5], N[(N[(N[(x * (-b)), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(a * N[(y * N[(b + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{x \cdot \left(-b\right)}{a}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot \left(b + 1\right)\right)}\\
\end{array}
\end{array}
if b < -5.5000000000000002e-5Initial program 100.0%
Taylor expanded in y around 0 86.9%
exp-diff67.4%
exp-to-pow67.4%
sub-neg67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in t around 0 78.1%
Taylor expanded in b around 0 40.9%
+-commutative40.9%
mul-1-neg40.9%
unsub-neg40.9%
associate-/l*35.2%
Simplified35.2%
Taylor expanded in b around inf 40.9%
if -5.5000000000000002e-5 < b Initial program 97.7%
associate-/l*98.2%
associate--l+98.2%
exp-sum84.0%
associate-/r*84.0%
*-commutative84.0%
exp-to-pow84.0%
exp-diff82.9%
*-commutative82.9%
exp-to-pow83.5%
sub-neg83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in t around 0 68.2%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in y around 0 56.7%
Taylor expanded in b around 0 41.8%
distribute-lft-out44.5%
distribute-rgt1-in44.5%
Simplified44.5%
Final simplification43.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b 4.8e-244) (* x (/ 1.0 (* y a))) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 4.8e-244) {
tmp = x * (1.0 / (y * a));
} 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 <= 4.8d-244) then
tmp = x * (1.0d0 / (y * a))
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 <= 4.8e-244) {
tmp = x * (1.0 / (y * a));
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 4.8e-244: tmp = x * (1.0 / (y * a)) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 4.8e-244) tmp = Float64(x * Float64(1.0 / Float64(y * a))); 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 <= 4.8e-244) tmp = x * (1.0 / (y * a)); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 4.8e-244], N[(x * N[(1.0 / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.8 \cdot 10^{-244}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < 4.80000000000000032e-244Initial program 97.6%
associate-/l*98.8%
associate--l+98.8%
exp-sum78.5%
associate-/r*78.5%
*-commutative78.5%
exp-to-pow78.5%
exp-diff72.0%
*-commutative72.0%
exp-to-pow72.4%
sub-neg72.4%
metadata-eval72.4%
Simplified72.4%
Taylor expanded in t around 0 62.3%
associate-/l*63.7%
Simplified63.7%
Taylor expanded in y around 0 62.1%
Taylor expanded in b around 0 35.6%
div-inv37.0%
Applied egg-rr37.0%
if 4.80000000000000032e-244 < b Initial program 99.2%
Taylor expanded in y around 0 80.2%
exp-diff76.8%
exp-to-pow77.5%
sub-neg77.5%
metadata-eval77.5%
Simplified77.5%
Taylor expanded in t around 0 64.1%
Taylor expanded in b around 0 39.5%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b 3e+54) (* 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 <= 3e+54) {
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 <= 3d+54) 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 <= 3e+54) {
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 <= 3e+54: 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 <= 3e+54) 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 <= 3e+54) 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, 3e+54], 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 3 \cdot 10^{+54}:\\
\;\;\;\;x \cdot \frac{1}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if b < 2.9999999999999999e54Initial program 97.9%
associate-/l*98.4%
associate--l+98.4%
exp-sum81.6%
associate-/r*81.6%
*-commutative81.6%
exp-to-pow81.6%
exp-diff76.8%
*-commutative76.8%
exp-to-pow77.3%
sub-neg77.3%
metadata-eval77.3%
Simplified77.3%
Taylor expanded in t around 0 65.9%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in y around 0 56.4%
Taylor expanded in b around 0 37.5%
div-inv38.4%
Applied egg-rr38.4%
if 2.9999999999999999e54 < b Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
exp-sum72.9%
associate-/r*72.9%
*-commutative72.9%
exp-to-pow72.9%
exp-diff70.8%
*-commutative70.8%
exp-to-pow70.8%
sub-neg70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in t around 0 72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in y around 0 87.7%
Taylor expanded in b around 0 47.5%
distribute-lft-out47.5%
distribute-rgt1-in47.5%
Simplified47.5%
Taylor expanded in b around inf 47.5%
*-commutative47.5%
Simplified47.5%
Final simplification40.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b 3.2e+49) (/ x (* y a)) (/ (/ x a) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 3.2e+49) {
tmp = x / (y * a);
} 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 <= 3.2d+49) then
tmp = x / (y * a)
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 <= 3.2e+49) {
tmp = x / (y * a);
} else {
tmp = (x / a) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= 3.2e+49: tmp = x / (y * a) else: tmp = (x / a) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 3.2e+49) tmp = Float64(x / Float64(y * a)); 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 <= 3.2e+49) tmp = x / (y * a); else tmp = (x / a) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 3.2e+49], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.2 \cdot 10^{+49}:\\
\;\;\;\;\frac{x}{y \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\
\end{array}
\end{array}
if b < 3.20000000000000014e49Initial program 97.9%
associate-/l*98.4%
associate--l+98.4%
exp-sum81.4%
associate-/r*81.4%
*-commutative81.4%
exp-to-pow81.4%
exp-diff77.0%
*-commutative77.0%
exp-to-pow77.6%
sub-neg77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in t around 0 66.0%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in y around 0 56.5%
Taylor expanded in b around 0 37.3%
if 3.20000000000000014e49 < b Initial program 100.0%
Taylor expanded in y around 0 88.2%
exp-diff80.2%
exp-to-pow80.2%
sub-neg80.2%
metadata-eval80.2%
Simplified80.2%
Taylor expanded in t around 0 86.2%
Taylor expanded in b around 0 37.7%
Final simplification37.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.3%
associate-/l*98.7%
associate--l+98.7%
exp-sum80.0%
associate-/r*80.0%
*-commutative80.0%
exp-to-pow80.0%
exp-diff75.7%
*-commutative75.7%
exp-to-pow76.1%
sub-neg76.1%
metadata-eval76.1%
Simplified76.1%
Taylor expanded in t around 0 67.2%
associate-/l*69.5%
Simplified69.5%
Taylor expanded in y around 0 62.3%
Taylor expanded in b around 0 34.8%
Final simplification34.8%
(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 2024096
(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))