
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - 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 * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
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)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - 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 * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
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)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 96.6%
fma-define97.0%
sub-neg97.0%
log1p-define100.0%
Simplified100.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.8e-9) (not (<= y 2.55e-55))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.8e-9) || !(y <= 2.55e-55)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((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 ((y <= (-4.8d-9)) .or. (.not. (y <= 2.55d-55))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((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 ((y <= -4.8e-9) || !(y <= 2.55e-55)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.8e-9) or not (y <= 2.55e-55): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.8e-9) || !(y <= 2.55e-55)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.8e-9) || ~((y <= 2.55e-55))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.8e-9], N[Not[LessEqual[y, 2.55e-55]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-9} \lor \neg \left(y \leq 2.55 \cdot 10^{-55}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -4.8e-9 or 2.54999999999999998e-55 < y Initial program 99.3%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 91.8%
if -4.8e-9 < y < 2.54999999999999998e-55Initial program 93.1%
fma-define93.1%
sub-neg93.1%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 84.0%
Taylor expanded in z around 0 84.0%
associate-*r*84.0%
mul-1-neg84.0%
Simplified84.0%
Final simplification88.3%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * (z + 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 * exp(((y * (log(z) - t)) - (a * (z + b))))
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)) - (a * (z + b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * (z + b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * Float64(z + b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * (z + b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}
\end{array}
Initial program 96.6%
Taylor expanded in z around 0 99.6%
+-commutative99.6%
associate-*r*99.6%
associate-*r*99.6%
distribute-lft-out99.6%
mul-1-neg99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (* y (- t))))) (t_2 (* x (exp (* a (- b))))))
(if (<= b -5.5e+69)
t_2
(if (<= b -1.6e-259)
t_1
(if (<= b 1.6e-207) (* x (pow z y)) (if (<= b 3.2e-34) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp((y * -t));
double t_2 = x * exp((a * -b));
double tmp;
if (b <= -5.5e+69) {
tmp = t_2;
} else if (b <= -1.6e-259) {
tmp = t_1;
} else if (b <= 1.6e-207) {
tmp = x * pow(z, y);
} else if (b <= 3.2e-34) {
tmp = t_1;
} 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 = x * exp((y * -t))
t_2 = x * exp((a * -b))
if (b <= (-5.5d+69)) then
tmp = t_2
else if (b <= (-1.6d-259)) then
tmp = t_1
else if (b <= 1.6d-207) then
tmp = x * (z ** y)
else if (b <= 3.2d-34) then
tmp = t_1
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.exp((y * -t));
double t_2 = x * Math.exp((a * -b));
double tmp;
if (b <= -5.5e+69) {
tmp = t_2;
} else if (b <= -1.6e-259) {
tmp = t_1;
} else if (b <= 1.6e-207) {
tmp = x * Math.pow(z, y);
} else if (b <= 3.2e-34) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp((y * -t)) t_2 = x * math.exp((a * -b)) tmp = 0 if b <= -5.5e+69: tmp = t_2 elif b <= -1.6e-259: tmp = t_1 elif b <= 1.6e-207: tmp = x * math.pow(z, y) elif b <= 3.2e-34: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(y * Float64(-t)))) t_2 = Float64(x * exp(Float64(a * Float64(-b)))) tmp = 0.0 if (b <= -5.5e+69) tmp = t_2; elseif (b <= -1.6e-259) tmp = t_1; elseif (b <= 1.6e-207) tmp = Float64(x * (z ^ y)); elseif (b <= 3.2e-34) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp((y * -t)); t_2 = x * exp((a * -b)); tmp = 0.0; if (b <= -5.5e+69) tmp = t_2; elseif (b <= -1.6e-259) tmp = t_1; elseif (b <= 1.6e-207) tmp = x * (z ^ y); elseif (b <= 3.2e-34) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.5e+69], t$95$2, If[LessEqual[b, -1.6e-259], t$95$1, If[LessEqual[b, 1.6e-207], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.2e-34], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(-t\right)}\\
t_2 := x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{if}\;b \leq -5.5 \cdot 10^{+69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.6 \cdot 10^{-259}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-207}:\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -5.50000000000000002e69 or 3.20000000000000003e-34 < b Initial program 99.2%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 83.9%
Taylor expanded in z around 0 83.9%
associate-*r*83.9%
mul-1-neg83.9%
Simplified83.9%
if -5.50000000000000002e69 < b < -1.59999999999999994e-259 or 1.6000000000000002e-207 < b < 3.20000000000000003e-34Initial program 95.2%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 73.1%
associate-*r*73.1%
neg-mul-173.1%
Simplified73.1%
if -1.59999999999999994e-259 < b < 1.6000000000000002e-207Initial program 90.0%
fma-define90.0%
sub-neg90.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 83.7%
Taylor expanded in t around 0 77.1%
Final simplification78.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.8e+52) (not (<= y 2.4))) (* x (pow z y)) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.8e+52) || !(y <= 2.4)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((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 ((y <= (-4.8d+52)) .or. (.not. (y <= 2.4d0))) then
tmp = x * (z ** y)
else
tmp = x * exp((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 ((y <= -4.8e+52) || !(y <= 2.4)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.8e+52) or not (y <= 2.4): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.8e+52) || !(y <= 2.4)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.8e+52) || ~((y <= 2.4))) tmp = x * (z ^ y); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.8e+52], N[Not[LessEqual[y, 2.4]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+52} \lor \neg \left(y \leq 2.4\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -4.8e52 or 2.39999999999999991 < y Initial program 99.2%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 92.5%
Taylor expanded in t around 0 62.5%
if -4.8e52 < y < 2.39999999999999991Initial program 94.3%
fma-define94.3%
sub-neg94.3%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 80.9%
Taylor expanded in z around 0 81.6%
associate-*r*81.6%
mul-1-neg81.6%
Simplified81.6%
Final simplification72.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -4e+52) (* x (- 1.0 (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4e+52) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * pow(z, 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 <= (-4d+52)) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x * (z ** 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 <= -4e+52) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4e+52: tmp = x * (1.0 - (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4e+52) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4e+52) tmp = x * (1.0 - (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4e+52], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+52}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -4e52Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 81.9%
associate-*r*81.9%
neg-mul-181.9%
Simplified81.9%
Taylor expanded in t around 0 32.0%
mul-1-neg32.0%
*-commutative32.0%
unsub-neg32.0%
Simplified32.0%
if -4e52 < t Initial program 95.2%
fma-define95.7%
sub-neg95.7%
log1p-define100.0%
Simplified100.0%
Taylor expanded in a around 0 69.7%
Taylor expanded in t around 0 61.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.85e-22)
(* a (* x (- b)))
(if (<= y 1.55e-91)
x
(if (<= y 1.75e+44) (* x (* a (- b))) (* (* y t) (- x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.85e-22) {
tmp = a * (x * -b);
} else if (y <= 1.55e-91) {
tmp = x;
} else if (y <= 1.75e+44) {
tmp = x * (a * -b);
} else {
tmp = (y * t) * -x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.85d-22)) then
tmp = a * (x * -b)
else if (y <= 1.55d-91) then
tmp = x
else if (y <= 1.75d+44) then
tmp = x * (a * -b)
else
tmp = (y * t) * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.85e-22) {
tmp = a * (x * -b);
} else if (y <= 1.55e-91) {
tmp = x;
} else if (y <= 1.75e+44) {
tmp = x * (a * -b);
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.85e-22: tmp = a * (x * -b) elif y <= 1.55e-91: tmp = x elif y <= 1.75e+44: tmp = x * (a * -b) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.85e-22) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 1.55e-91) tmp = x; elseif (y <= 1.75e+44) tmp = Float64(x * Float64(a * Float64(-b))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.85e-22) tmp = a * (x * -b); elseif (y <= 1.55e-91) tmp = x; elseif (y <= 1.75e+44) tmp = x * (a * -b); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.85e-22], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-91], x, If[LessEqual[y, 1.75e+44], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-22}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-91}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -1.85e-22Initial program 98.6%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 47.4%
Taylor expanded in z around 0 47.4%
associate-*r*47.4%
mul-1-neg47.4%
Simplified47.4%
Taylor expanded in a around 0 18.6%
mul-1-neg18.6%
associate-*r*15.9%
distribute-lft-neg-in15.9%
neg-mul-115.9%
distribute-rgt1-in15.9%
+-commutative15.9%
neg-mul-115.9%
unsub-neg15.9%
Simplified15.9%
Taylor expanded in a around inf 25.9%
associate-*r*25.9%
neg-mul-125.9%
*-commutative25.9%
Simplified25.9%
if -1.85e-22 < y < 1.5499999999999999e-91Initial program 93.4%
fma-define93.4%
sub-neg93.4%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 85.3%
Taylor expanded in a around 0 36.6%
if 1.5499999999999999e-91 < y < 1.75e44Initial program 96.5%
fma-define96.5%
sub-neg96.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 54.8%
Taylor expanded in z around 0 58.4%
associate-*r*58.4%
mul-1-neg58.4%
Simplified58.4%
Taylor expanded in a around 0 27.2%
mul-1-neg27.2%
associate-*r*30.6%
distribute-lft-neg-in30.6%
neg-mul-130.6%
distribute-rgt1-in30.6%
+-commutative30.6%
neg-mul-130.6%
unsub-neg30.6%
Simplified30.6%
Taylor expanded in a around inf 34.6%
mul-1-neg34.6%
distribute-rgt-neg-out34.6%
Simplified34.6%
if 1.75e44 < y Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 59.2%
associate-*r*59.2%
neg-mul-159.2%
Simplified59.2%
Taylor expanded in t around 0 30.4%
mul-1-neg30.4%
*-commutative30.4%
unsub-neg30.4%
Simplified30.4%
Taylor expanded in y around inf 29.0%
associate-*r*29.0%
*-commutative29.0%
associate-*r*34.5%
mul-1-neg34.5%
Simplified34.5%
Final simplification32.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.8e-21) (* a (* x (- b))) (if (<= y 135.0) (* x (- 1.0 (* a b))) (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e-21) {
tmp = a * (x * -b);
} else if (y <= 135.0) {
tmp = x * (1.0 - (a * b));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.8d-21)) then
tmp = a * (x * -b)
else if (y <= 135.0d0) then
tmp = x * (1.0d0 - (a * b))
else
tmp = (y * t) * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e-21) {
tmp = a * (x * -b);
} else if (y <= 135.0) {
tmp = x * (1.0 - (a * b));
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.8e-21: tmp = a * (x * -b) elif y <= 135.0: tmp = x * (1.0 - (a * b)) else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.8e-21) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 135.0) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.8e-21) tmp = a * (x * -b); elseif (y <= 135.0) tmp = x * (1.0 - (a * b)); else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.8e-21], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 135.0], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-21}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 135:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -1.79999999999999995e-21Initial program 98.6%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 47.4%
Taylor expanded in z around 0 47.4%
associate-*r*47.4%
mul-1-neg47.4%
Simplified47.4%
Taylor expanded in a around 0 18.6%
mul-1-neg18.6%
associate-*r*15.9%
distribute-lft-neg-in15.9%
neg-mul-115.9%
distribute-rgt1-in15.9%
+-commutative15.9%
neg-mul-115.9%
unsub-neg15.9%
Simplified15.9%
Taylor expanded in a around inf 25.9%
associate-*r*25.9%
neg-mul-125.9%
*-commutative25.9%
Simplified25.9%
if -1.79999999999999995e-21 < y < 135Initial program 93.5%
fma-define93.5%
sub-neg93.5%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 83.2%
Taylor expanded in z around 0 84.0%
associate-*r*84.0%
mul-1-neg84.0%
Simplified84.0%
Taylor expanded in a around 0 46.2%
mul-1-neg46.2%
associate-*r*48.6%
distribute-lft-neg-in48.6%
neg-mul-148.6%
distribute-rgt1-in48.6%
+-commutative48.6%
neg-mul-148.6%
unsub-neg48.6%
Simplified48.6%
if 135 < y Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 54.6%
associate-*r*54.6%
neg-mul-154.6%
Simplified54.6%
Taylor expanded in t around 0 25.1%
mul-1-neg25.1%
*-commutative25.1%
unsub-neg25.1%
Simplified25.1%
Taylor expanded in y around inf 25.7%
associate-*r*25.7%
*-commutative25.7%
associate-*r*30.1%
mul-1-neg30.1%
Simplified30.1%
Final simplification37.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.3e+102) (* x (* a (- b))) (if (<= b 6.5e+78) (* x (- 1.0 (* y t))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.3e+102) {
tmp = x * (a * -b);
} else if (b <= 6.5e+78) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -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+102)) then
tmp = x * (a * -b)
else if (b <= 6.5d+78) then
tmp = x * (1.0d0 - (y * t))
else
tmp = a * (x * -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+102) {
tmp = x * (a * -b);
} else if (b <= 6.5e+78) {
tmp = x * (1.0 - (y * t));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.3e+102: tmp = x * (a * -b) elif b <= 6.5e+78: tmp = x * (1.0 - (y * t)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.3e+102) tmp = Float64(x * Float64(a * Float64(-b))); elseif (b <= 6.5e+78) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.3e+102) tmp = x * (a * -b); elseif (b <= 6.5e+78) tmp = x * (1.0 - (y * t)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.3e+102], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e+78], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+102}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+78}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if b < -1.30000000000000003e102Initial program 100.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 89.3%
Taylor expanded in z around 0 89.3%
associate-*r*89.3%
mul-1-neg89.3%
Simplified89.3%
Taylor expanded in a around 0 39.6%
mul-1-neg39.6%
associate-*r*46.0%
distribute-lft-neg-in46.0%
neg-mul-146.0%
distribute-rgt1-in46.0%
+-commutative46.0%
neg-mul-146.0%
unsub-neg46.0%
Simplified46.0%
Taylor expanded in a around inf 43.4%
mul-1-neg43.4%
distribute-rgt-neg-out43.4%
Simplified43.4%
if -1.30000000000000003e102 < b < 6.50000000000000036e78Initial program 95.2%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 62.7%
associate-*r*62.7%
neg-mul-162.7%
Simplified62.7%
Taylor expanded in t around 0 32.5%
mul-1-neg32.5%
*-commutative32.5%
unsub-neg32.5%
Simplified32.5%
if 6.50000000000000036e78 < b Initial program 98.0%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 80.3%
Taylor expanded in z around 0 80.3%
associate-*r*80.3%
mul-1-neg80.3%
Simplified80.3%
Taylor expanded in a around 0 32.4%
mul-1-neg32.4%
associate-*r*26.7%
distribute-lft-neg-in26.7%
neg-mul-126.7%
distribute-rgt1-in26.7%
+-commutative26.7%
neg-mul-126.7%
unsub-neg26.7%
Simplified26.7%
Taylor expanded in a around inf 28.7%
associate-*r*28.7%
neg-mul-128.7%
*-commutative28.7%
Simplified28.7%
Final simplification33.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.55e-24) (not (<= y 36000.0))) (* a (* x (- z))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.55e-24) || !(y <= 36000.0)) {
tmp = a * (x * -z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.55d-24)) .or. (.not. (y <= 36000.0d0))) then
tmp = a * (x * -z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.55e-24) || !(y <= 36000.0)) {
tmp = a * (x * -z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.55e-24) or not (y <= 36000.0): tmp = a * (x * -z) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.55e-24) || !(y <= 36000.0)) tmp = Float64(a * Float64(x * Float64(-z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.55e-24) || ~((y <= 36000.0))) tmp = a * (x * -z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.55e-24], N[Not[LessEqual[y, 36000.0]], $MachinePrecision]], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-24} \lor \neg \left(y \leq 36000\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.55e-24 or 36000 < y Initial program 99.3%
Taylor expanded in z around 0 99.3%
+-commutative99.3%
associate-*r*99.3%
associate-*r*99.3%
distribute-lft-out99.3%
mul-1-neg99.3%
Simplified99.3%
Taylor expanded in z around inf 19.3%
associate-*r*19.3%
mul-1-neg19.3%
Simplified19.3%
Taylor expanded in a around 0 5.7%
mul-1-neg5.7%
unsub-neg5.7%
Simplified5.7%
Taylor expanded in a around inf 21.7%
mul-1-neg21.7%
distribute-rgt-neg-out21.7%
distribute-rgt-neg-in21.7%
Simplified21.7%
if -1.55e-24 < y < 36000Initial program 93.6%
fma-define93.6%
sub-neg93.6%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 81.9%
Taylor expanded in a around 0 33.4%
Final simplification27.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.05e-25) (* a (* x (- b))) (if (<= y 1.22e-30) x (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.05e-25) {
tmp = a * (x * -b);
} else if (y <= 1.22e-30) {
tmp = x;
} else {
tmp = (y * t) * -x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.05d-25)) then
tmp = a * (x * -b)
else if (y <= 1.22d-30) then
tmp = x
else
tmp = (y * t) * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.05e-25) {
tmp = a * (x * -b);
} else if (y <= 1.22e-30) {
tmp = x;
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.05e-25: tmp = a * (x * -b) elif y <= 1.22e-30: tmp = x else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.05e-25) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 1.22e-30) tmp = x; else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.05e-25) tmp = a * (x * -b); elseif (y <= 1.22e-30) tmp = x; else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.05e-25], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e-30], x, N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{-25}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -2.04999999999999994e-25Initial program 98.6%
fma-define100.0%
sub-neg100.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 47.4%
Taylor expanded in z around 0 47.4%
associate-*r*47.4%
mul-1-neg47.4%
Simplified47.4%
Taylor expanded in a around 0 18.6%
mul-1-neg18.6%
associate-*r*15.9%
distribute-lft-neg-in15.9%
neg-mul-115.9%
distribute-rgt1-in15.9%
+-commutative15.9%
neg-mul-115.9%
unsub-neg15.9%
Simplified15.9%
Taylor expanded in a around inf 25.9%
associate-*r*25.9%
neg-mul-125.9%
*-commutative25.9%
Simplified25.9%
if -2.04999999999999994e-25 < y < 1.22e-30Initial program 93.3%
fma-define93.3%
sub-neg93.3%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 84.3%
Taylor expanded in a around 0 34.9%
if 1.22e-30 < y Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 57.3%
associate-*r*57.3%
neg-mul-157.3%
Simplified57.3%
Taylor expanded in t around 0 25.3%
mul-1-neg25.3%
*-commutative25.3%
unsub-neg25.3%
Simplified25.3%
Taylor expanded in y around inf 25.8%
associate-*r*25.8%
*-commutative25.8%
associate-*r*30.0%
mul-1-neg30.0%
Simplified30.0%
Final simplification31.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7e-25) (* a (* x (- z))) (if (<= y 2.4e-29) x (* (* y t) (- x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7e-25) {
tmp = a * (x * -z);
} else if (y <= 2.4e-29) {
tmp = x;
} else {
tmp = (y * t) * -x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-7d-25)) then
tmp = a * (x * -z)
else if (y <= 2.4d-29) then
tmp = x
else
tmp = (y * t) * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7e-25) {
tmp = a * (x * -z);
} else if (y <= 2.4e-29) {
tmp = x;
} else {
tmp = (y * t) * -x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7e-25: tmp = a * (x * -z) elif y <= 2.4e-29: tmp = x else: tmp = (y * t) * -x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7e-25) tmp = Float64(a * Float64(x * Float64(-z))); elseif (y <= 2.4e-29) tmp = x; else tmp = Float64(Float64(y * t) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7e-25) tmp = a * (x * -z); elseif (y <= 2.4e-29) tmp = x; else tmp = (y * t) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7e-25], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e-29], x, N[(N[(y * t), $MachinePrecision] * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-25}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\
\end{array}
\end{array}
if y < -7.0000000000000004e-25Initial program 98.6%
Taylor expanded in z around 0 98.6%
+-commutative98.6%
associate-*r*98.6%
associate-*r*98.6%
distribute-lft-out98.6%
mul-1-neg98.6%
Simplified98.6%
Taylor expanded in z around inf 21.3%
associate-*r*21.3%
mul-1-neg21.3%
Simplified21.3%
Taylor expanded in a around 0 7.1%
mul-1-neg7.1%
unsub-neg7.1%
Simplified7.1%
Taylor expanded in a around inf 17.0%
mul-1-neg17.0%
distribute-rgt-neg-out17.0%
distribute-rgt-neg-in17.0%
Simplified17.0%
if -7.0000000000000004e-25 < y < 2.39999999999999992e-29Initial program 93.3%
fma-define93.3%
sub-neg93.3%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 84.3%
Taylor expanded in a around 0 34.9%
if 2.39999999999999992e-29 < y Initial program 100.0%
Taylor expanded in z around 0 100.0%
+-commutative100.0%
associate-*r*100.0%
associate-*r*100.0%
distribute-lft-out100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 57.3%
associate-*r*57.3%
neg-mul-157.3%
Simplified57.3%
Taylor expanded in t around 0 25.3%
mul-1-neg25.3%
*-commutative25.3%
unsub-neg25.3%
Simplified25.3%
Taylor expanded in y around inf 25.8%
associate-*r*25.8%
*-commutative25.8%
associate-*r*30.0%
mul-1-neg30.0%
Simplified30.0%
Final simplification28.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.6%
fma-define97.0%
sub-neg97.0%
log1p-define100.0%
Simplified100.0%
Taylor expanded in y around 0 61.2%
Taylor expanded in a around 0 18.4%
herbie shell --seed 2024177
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))