
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.8e+43)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1000000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(* (cos B) (/ x (sin B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.8e+43) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1000000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (cos(B) * (x / sin(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.8d+43)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1000000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (cos(b) * (x / sin(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.8e+43) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1000000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (Math.cos(B) * (x / Math.sin(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.8e+43: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1000000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (math.cos(B) * (x / math.sin(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.8e+43) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1000000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(cos(B) * Float64(x / sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.8e+43) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1000000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (cos(B) * (x / sin(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e+43], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1000000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.80000000000000005e43Initial program 44.1%
Taylor expanded in F around -inf 99.9%
expm1-log1p-u42.5%
expm1-udef42.5%
div-inv42.5%
neg-mul-142.5%
fma-def42.5%
Applied egg-rr42.5%
expm1-def42.5%
expm1-log1p100.0%
rem-log-exp36.0%
fma-udef36.0%
neg-mul-136.0%
prod-exp24.8%
*-commutative24.8%
prod-exp36.0%
rem-log-exp100.0%
unsub-neg100.0%
Simplified100.0%
if -1.80000000000000005e43 < F < 1e9Initial program 99.6%
Taylor expanded in x around 0 99.7%
associate-*r/99.7%
Simplified99.7%
if 1e9 < F Initial program 57.1%
+-commutative57.1%
unsub-neg57.1%
associate-*l/72.7%
associate-*r/72.7%
*-commutative72.7%
Simplified72.8%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e+53)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 140000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.9e+53) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 140000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.9d+53)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 140000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.9e+53) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 140000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.9e+53: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 140000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e+53) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 140000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.9e+53) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 140000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e+53], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 140000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{+53}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 140000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.89999999999999999e53Initial program 41.5%
Taylor expanded in F around -inf 99.9%
expm1-log1p-u41.5%
expm1-udef41.5%
div-inv41.5%
neg-mul-141.5%
fma-def41.5%
Applied egg-rr41.5%
expm1-def41.5%
expm1-log1p100.0%
rem-log-exp34.5%
fma-udef34.5%
neg-mul-134.5%
prod-exp22.8%
*-commutative22.8%
prod-exp34.5%
rem-log-exp100.0%
unsub-neg100.0%
Simplified100.0%
if -1.89999999999999999e53 < F < 1.4e8Initial program 99.6%
if 1.4e8 < F Initial program 57.1%
+-commutative57.1%
unsub-neg57.1%
associate-*l/72.7%
associate-*r/72.7%
*-commutative72.7%
Simplified72.8%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.85)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.85) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.85d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.85) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.85: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.85) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.85) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.85], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.85:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.8500000000000001Initial program 48.7%
Taylor expanded in F around -inf 99.9%
expm1-log1p-u44.5%
expm1-udef44.4%
div-inv44.4%
neg-mul-144.4%
fma-def44.4%
Applied egg-rr44.4%
expm1-def44.5%
expm1-log1p99.9%
rem-log-exp40.0%
fma-udef40.0%
neg-mul-140.0%
prod-exp29.7%
*-commutative29.7%
prod-exp40.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -1.8500000000000001 < F < 1.3999999999999999Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 98.9%
if 1.3999999999999999 < F Initial program 57.7%
+-commutative57.7%
unsub-neg57.7%
associate-*l/73.1%
associate-*r/73.0%
*-commutative73.0%
Simplified73.1%
Taylor expanded in F around inf 98.9%
*-commutative98.9%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in F around 0 99.2%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 48.7%
Taylor expanded in F around -inf 99.9%
expm1-log1p-u44.5%
expm1-udef44.4%
div-inv44.4%
neg-mul-144.4%
fma-def44.4%
Applied egg-rr44.4%
expm1-def44.5%
expm1-log1p99.9%
rem-log-exp40.0%
fma-udef40.0%
neg-mul-140.0%
prod-exp29.7%
*-commutative29.7%
prod-exp40.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -1.44999999999999996 < F < 1.3999999999999999Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 98.9%
Taylor expanded in x around 0 98.9%
if 1.3999999999999999 < F Initial program 57.7%
+-commutative57.7%
unsub-neg57.7%
associate-*l/73.1%
associate-*r/73.0%
*-commutative73.0%
Simplified73.1%
Taylor expanded in F around inf 98.9%
*-commutative98.9%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in F around 0 99.2%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))) (t_1 (/ x (tan B))))
(if (<= F -2.5e-5)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -3.2e-50)
t_0
(if (<= F -9.6e-85)
(/ (- x) (tan B))
(if (<= F -7.8e-85)
t_0
(if (<= F 1.75e-9)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_1)
(- (/ 1.0 (sin B)) t_1))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double t_1 = x / tan(B);
double tmp;
if (F <= -2.5e-5) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -3.2e-50) {
tmp = t_0;
} else if (F <= -9.6e-85) {
tmp = -x / tan(B);
} else if (F <= -7.8e-85) {
tmp = t_0;
} else if (F <= 1.75e-9) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_1;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt(0.5d0) / (sin(b) / f)
t_1 = x / tan(b)
if (f <= (-2.5d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-3.2d-50)) then
tmp = t_0
else if (f <= (-9.6d-85)) then
tmp = -x / tan(b)
else if (f <= (-7.8d-85)) then
tmp = t_0
else if (f <= 1.75d-9) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_1
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.5e-5) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -3.2e-50) {
tmp = t_0;
} else if (F <= -9.6e-85) {
tmp = -x / Math.tan(B);
} else if (F <= -7.8e-85) {
tmp = t_0;
} else if (F <= 1.75e-9) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) t_1 = x / math.tan(B) tmp = 0 if F <= -2.5e-5: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -3.2e-50: tmp = t_0 elif F <= -9.6e-85: tmp = -x / math.tan(B) elif F <= -7.8e-85: tmp = t_0 elif F <= 1.75e-9: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_1 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.5e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -3.2e-50) tmp = t_0; elseif (F <= -9.6e-85) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= -7.8e-85) tmp = t_0; elseif (F <= 1.75e-9) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_1); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); t_1 = x / tan(B); tmp = 0.0; if (F <= -2.5e-5) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -3.2e-50) tmp = t_0; elseif (F <= -9.6e-85) tmp = -x / tan(B); elseif (F <= -7.8e-85) tmp = t_0; elseif (F <= 1.75e-9) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_1; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.2e-50], t$95$0, If[LessEqual[F, -9.6e-85], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.8e-85], t$95$0, If[LessEqual[F, 1.75e-9], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-50}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -9.6 \cdot 10^{-85}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq -7.8 \cdot 10^{-85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-9}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -2.50000000000000012e-5Initial program 48.7%
Taylor expanded in F around -inf 99.9%
expm1-log1p-u44.5%
expm1-udef44.4%
div-inv44.4%
neg-mul-144.4%
fma-def44.4%
Applied egg-rr44.4%
expm1-def44.5%
expm1-log1p99.9%
rem-log-exp40.0%
fma-udef40.0%
neg-mul-140.0%
prod-exp29.7%
*-commutative29.7%
prod-exp40.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -2.50000000000000012e-5 < F < -3.2e-50 or -9.6000000000000002e-85 < F < -7.79999999999999977e-85Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.7%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in F around 0 97.3%
Taylor expanded in x around 0 81.0%
associate-/l*81.2%
Simplified81.2%
if -3.2e-50 < F < -9.6000000000000002e-85Initial program 99.8%
Taylor expanded in F around -inf 60.8%
Taylor expanded in x around inf 99.8%
clear-num99.3%
inv-pow99.6%
*-un-lft-identity99.6%
*-commutative99.6%
times-frac99.3%
tan-quot99.8%
Applied egg-rr99.8%
unpow-199.8%
*-commutative99.8%
associate-*r/99.6%
*-commutative99.6%
*-lft-identity99.6%
associate-/r/99.8%
*-commutative99.8%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
if -7.79999999999999977e-85 < F < 1.75e-9Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 89.5%
if 1.75e-9 < F Initial program 59.4%
+-commutative59.4%
unsub-neg59.4%
associate-*l/74.2%
associate-*r/74.1%
*-commutative74.1%
Simplified74.2%
Taylor expanded in F around inf 96.7%
*-commutative96.7%
associate-/r*96.8%
Simplified96.8%
Taylor expanded in F around 0 97.0%
Final simplification94.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.5e+38)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8.6e-50)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1.75e-9)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.5e+38) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8.6e-50) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.75e-9) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.5d+38)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8.6d-50)) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1.75d-9) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.5e+38) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8.6e-50) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.75e-9) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.5e+38: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8.6e-50: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1.75e-9: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.5e+38) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8.6e-50) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 1.75e-9) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.5e+38) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8.6e-50) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1.75e-9) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.5e+38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.6e-50], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e-9], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.5 \cdot 10^{+38}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -8.6 \cdot 10^{-50}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-9}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.5e38Initial program 44.1%
Taylor expanded in F around -inf 99.9%
expm1-log1p-u42.5%
expm1-udef42.5%
div-inv42.5%
neg-mul-142.5%
fma-def42.5%
Applied egg-rr42.5%
expm1-def42.5%
expm1-log1p100.0%
rem-log-exp36.0%
fma-udef36.0%
neg-mul-136.0%
prod-exp24.8%
*-commutative24.8%
prod-exp36.0%
rem-log-exp100.0%
unsub-neg100.0%
Simplified100.0%
if -6.5e38 < F < -8.59999999999999995e-50Initial program 99.7%
Taylor expanded in B around 0 95.9%
if -8.59999999999999995e-50 < F < 1.75e-9Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 89.4%
if 1.75e-9 < F Initial program 59.4%
+-commutative59.4%
unsub-neg59.4%
associate-*l/74.2%
associate-*r/74.1%
*-commutative74.1%
Simplified74.2%
Taylor expanded in F around inf 96.7%
*-commutative96.7%
associate-/r*96.8%
Simplified96.8%
Taylor expanded in F around 0 97.0%
Final simplification94.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.028)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -6.5e-50)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 1.3e-25) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.028) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -6.5e-50) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 1.3e-25) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.028d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-6.5d-50)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 1.3d-25) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.028) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -6.5e-50) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 1.3e-25) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.028: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -6.5e-50: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 1.3e-25: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.028) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -6.5e-50) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 1.3e-25) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.028) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -6.5e-50) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 1.3e-25) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.028], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -6.5e-50], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-25], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.028:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-25}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.0280000000000000006Initial program 48.7%
Taylor expanded in F around -inf 99.9%
expm1-log1p-u44.5%
expm1-udef44.4%
div-inv44.4%
neg-mul-144.4%
fma-def44.4%
Applied egg-rr44.4%
expm1-def44.5%
expm1-log1p99.9%
rem-log-exp40.0%
fma-udef40.0%
neg-mul-140.0%
prod-exp29.7%
*-commutative29.7%
prod-exp40.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -0.0280000000000000006 < F < -6.49999999999999987e-50Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.8%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 96.9%
Taylor expanded in x around 0 78.8%
associate-/l*78.8%
Simplified78.8%
if -6.49999999999999987e-50 < F < 1.3e-25Initial program 99.6%
Taylor expanded in F around -inf 40.0%
Taylor expanded in x around inf 79.0%
clear-num78.8%
inv-pow78.8%
*-un-lft-identity78.8%
*-commutative78.8%
times-frac78.7%
tan-quot78.9%
Applied egg-rr78.9%
unpow-178.9%
*-commutative78.9%
associate-*r/78.8%
*-commutative78.8%
*-lft-identity78.8%
associate-/r/78.9%
*-commutative78.9%
associate-*r/79.1%
*-rgt-identity79.1%
Simplified79.1%
if 1.3e-25 < F Initial program 59.4%
+-commutative59.4%
unsub-neg59.4%
associate-*l/74.2%
associate-*r/74.1%
*-commutative74.1%
Simplified74.2%
Taylor expanded in F around inf 96.7%
*-commutative96.7%
associate-/r*96.8%
Simplified96.8%
Taylor expanded in F around 0 97.0%
Final simplification90.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* B (+ 0.16666666666666666 (* x 0.3333333333333333))))
(t_1 (/ (- x) (tan B))))
(if (<= F -0.018)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.5e-50)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 4400000000.0)
t_1
(if (<= F 9.6e+146)
(- (+ t_0 (/ 1.0 B)) (/ x B))
(if (<= F 6e+210) t_1 (+ t_0 (/ (- 1.0 x) B)))))))))
double code(double F, double B, double x) {
double t_0 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double t_1 = -x / tan(B);
double tmp;
if (F <= -0.018) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.5e-50) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 4400000000.0) {
tmp = t_1;
} else if (F <= 9.6e+146) {
tmp = (t_0 + (1.0 / B)) - (x / B);
} else if (F <= 6e+210) {
tmp = t_1;
} else {
tmp = t_0 + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))
t_1 = -x / tan(b)
if (f <= (-0.018d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.5d-50)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 4400000000.0d0) then
tmp = t_1
else if (f <= 9.6d+146) then
tmp = (t_0 + (1.0d0 / b)) - (x / b)
else if (f <= 6d+210) then
tmp = t_1
else
tmp = t_0 + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double t_1 = -x / Math.tan(B);
double tmp;
if (F <= -0.018) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.5e-50) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 4400000000.0) {
tmp = t_1;
} else if (F <= 9.6e+146) {
tmp = (t_0 + (1.0 / B)) - (x / B);
} else if (F <= 6e+210) {
tmp = t_1;
} else {
tmp = t_0 + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = B * (0.16666666666666666 + (x * 0.3333333333333333)) t_1 = -x / math.tan(B) tmp = 0 if F <= -0.018: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.5e-50: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 4400000000.0: tmp = t_1 elif F <= 9.6e+146: tmp = (t_0 + (1.0 / B)) - (x / B) elif F <= 6e+210: tmp = t_1 else: tmp = t_0 + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) t_1 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -0.018) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.5e-50) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 4400000000.0) tmp = t_1; elseif (F <= 9.6e+146) tmp = Float64(Float64(t_0 + Float64(1.0 / B)) - Float64(x / B)); elseif (F <= 6e+210) tmp = t_1; else tmp = Float64(t_0 + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = B * (0.16666666666666666 + (x * 0.3333333333333333)); t_1 = -x / tan(B); tmp = 0.0; if (F <= -0.018) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.5e-50) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 4400000000.0) tmp = t_1; elseif (F <= 9.6e+146) tmp = (t_0 + (1.0 / B)) - (x / B); elseif (F <= 6e+210) tmp = t_1; else tmp = t_0 + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.018], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.5e-50], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4400000000.0], t$95$1, If[LessEqual[F, 9.6e+146], N[(N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e+210], t$95$1, N[(t$95$0 + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\\
t_1 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -0.018:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 4400000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 9.6 \cdot 10^{+146}:\\
\;\;\;\;\left(t_0 + \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+210}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.0179999999999999986Initial program 48.7%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 83.6%
if -0.0179999999999999986 < F < -4.49999999999999962e-50Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.8%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 96.9%
Taylor expanded in x around 0 78.8%
associate-/l*78.8%
Simplified78.8%
if -4.49999999999999962e-50 < F < 4.4e9 or 9.6000000000000008e146 < F < 6.00000000000000044e210Initial program 91.1%
Taylor expanded in F around -inf 43.3%
Taylor expanded in x around inf 74.8%
clear-num74.6%
inv-pow74.6%
*-un-lft-identity74.6%
*-commutative74.6%
times-frac74.5%
tan-quot74.6%
Applied egg-rr74.6%
unpow-174.6%
*-commutative74.6%
associate-*r/74.7%
*-commutative74.7%
*-lft-identity74.7%
associate-/r/74.7%
*-commutative74.7%
associate-*r/74.9%
*-rgt-identity74.9%
Simplified74.9%
if 4.4e9 < F < 9.6000000000000008e146Initial program 86.2%
+-commutative86.2%
unsub-neg86.2%
associate-*l/99.7%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
*-commutative99.5%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 63.4%
if 6.00000000000000044e210 < F Initial program 25.1%
+-commutative25.1%
unsub-neg25.1%
associate-*l/44.8%
associate-*r/44.8%
*-commutative44.8%
Simplified45.0%
Taylor expanded in F around inf 99.8%
*-commutative99.8%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in B around 0 69.1%
associate--l+69.1%
*-commutative69.1%
*-commutative69.1%
div-sub69.1%
Simplified69.1%
Final simplification75.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* B (+ 0.16666666666666666 (* x 0.3333333333333333))))
(t_1 (/ (- x) (tan B))))
(if (<= F -0.00145)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -4.2e-50)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 4400000000.0)
t_1
(if (<= F 7.8e+146)
(- (+ t_0 (/ 1.0 B)) (/ x B))
(if (<= F 1.85e+211) t_1 (+ t_0 (/ (- 1.0 x) B)))))))))
double code(double F, double B, double x) {
double t_0 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double t_1 = -x / tan(B);
double tmp;
if (F <= -0.00145) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -4.2e-50) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 4400000000.0) {
tmp = t_1;
} else if (F <= 7.8e+146) {
tmp = (t_0 + (1.0 / B)) - (x / B);
} else if (F <= 1.85e+211) {
tmp = t_1;
} else {
tmp = t_0 + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))
t_1 = -x / tan(b)
if (f <= (-0.00145d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-4.2d-50)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 4400000000.0d0) then
tmp = t_1
else if (f <= 7.8d+146) then
tmp = (t_0 + (1.0d0 / b)) - (x / b)
else if (f <= 1.85d+211) then
tmp = t_1
else
tmp = t_0 + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double t_1 = -x / Math.tan(B);
double tmp;
if (F <= -0.00145) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -4.2e-50) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 4400000000.0) {
tmp = t_1;
} else if (F <= 7.8e+146) {
tmp = (t_0 + (1.0 / B)) - (x / B);
} else if (F <= 1.85e+211) {
tmp = t_1;
} else {
tmp = t_0 + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = B * (0.16666666666666666 + (x * 0.3333333333333333)) t_1 = -x / math.tan(B) tmp = 0 if F <= -0.00145: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -4.2e-50: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 4400000000.0: tmp = t_1 elif F <= 7.8e+146: tmp = (t_0 + (1.0 / B)) - (x / B) elif F <= 1.85e+211: tmp = t_1 else: tmp = t_0 + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) t_1 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -0.00145) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -4.2e-50) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 4400000000.0) tmp = t_1; elseif (F <= 7.8e+146) tmp = Float64(Float64(t_0 + Float64(1.0 / B)) - Float64(x / B)); elseif (F <= 1.85e+211) tmp = t_1; else tmp = Float64(t_0 + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = B * (0.16666666666666666 + (x * 0.3333333333333333)); t_1 = -x / tan(B); tmp = 0.0; if (F <= -0.00145) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -4.2e-50) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 4400000000.0) tmp = t_1; elseif (F <= 7.8e+146) tmp = (t_0 + (1.0 / B)) - (x / B); elseif (F <= 1.85e+211) tmp = t_1; else tmp = t_0 + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00145], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.2e-50], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4400000000.0], t$95$1, If[LessEqual[F, 7.8e+146], N[(N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e+211], t$95$1, N[(t$95$0 + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\\
t_1 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -0.00145:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 4400000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{+146}:\\
\;\;\;\;\left(t_0 + \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{+211}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.00145Initial program 48.7%
Taylor expanded in F around -inf 99.9%
expm1-log1p-u44.5%
expm1-udef44.4%
div-inv44.4%
neg-mul-144.4%
fma-def44.4%
Applied egg-rr44.4%
expm1-def44.5%
expm1-log1p99.9%
rem-log-exp40.0%
fma-udef40.0%
neg-mul-140.0%
prod-exp29.7%
*-commutative29.7%
prod-exp40.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -0.00145 < F < -4.2000000000000002e-50Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.8%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 96.9%
Taylor expanded in x around 0 78.8%
associate-/l*78.8%
Simplified78.8%
if -4.2000000000000002e-50 < F < 4.4e9 or 7.8e146 < F < 1.85000000000000005e211Initial program 91.1%
Taylor expanded in F around -inf 43.3%
Taylor expanded in x around inf 74.8%
clear-num74.6%
inv-pow74.6%
*-un-lft-identity74.6%
*-commutative74.6%
times-frac74.5%
tan-quot74.6%
Applied egg-rr74.6%
unpow-174.6%
*-commutative74.6%
associate-*r/74.7%
*-commutative74.7%
*-lft-identity74.7%
associate-/r/74.7%
*-commutative74.7%
associate-*r/74.9%
*-rgt-identity74.9%
Simplified74.9%
if 4.4e9 < F < 7.8e146Initial program 86.2%
+-commutative86.2%
unsub-neg86.2%
associate-*l/99.7%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
*-commutative99.5%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 63.4%
if 1.85000000000000005e211 < F Initial program 25.1%
+-commutative25.1%
unsub-neg25.1%
associate-*l/44.8%
associate-*r/44.8%
*-commutative44.8%
Simplified45.0%
Taylor expanded in F around inf 99.8%
*-commutative99.8%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in B around 0 69.1%
associate--l+69.1%
*-commutative69.1%
*-commutative69.1%
div-sub69.1%
Simplified69.1%
Final simplification80.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B)))
(t_1 (* B (+ 0.16666666666666666 (* x 0.3333333333333333)))))
(if (<= F -2.45e+35)
(- (/ -1.0 B) (/ x B))
(if (<= F 4400000000.0)
t_0
(if (<= F 1.05e+147)
(- (+ t_1 (/ 1.0 B)) (/ x B))
(if (<= F 6e+210) t_0 (+ t_1 (/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double tmp;
if (F <= -2.45e+35) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 4400000000.0) {
tmp = t_0;
} else if (F <= 1.05e+147) {
tmp = (t_1 + (1.0 / B)) - (x / B);
} else if (F <= 6e+210) {
tmp = t_0;
} else {
tmp = t_1 + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))
if (f <= (-2.45d+35)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 4400000000.0d0) then
tmp = t_0
else if (f <= 1.05d+147) then
tmp = (t_1 + (1.0d0 / b)) - (x / b)
else if (f <= 6d+210) then
tmp = t_0
else
tmp = t_1 + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double tmp;
if (F <= -2.45e+35) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 4400000000.0) {
tmp = t_0;
} else if (F <= 1.05e+147) {
tmp = (t_1 + (1.0 / B)) - (x / B);
} else if (F <= 6e+210) {
tmp = t_0;
} else {
tmp = t_1 + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333)) tmp = 0 if F <= -2.45e+35: tmp = (-1.0 / B) - (x / B) elif F <= 4400000000.0: tmp = t_0 elif F <= 1.05e+147: tmp = (t_1 + (1.0 / B)) - (x / B) elif F <= 6e+210: tmp = t_0 else: tmp = t_1 + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) tmp = 0.0 if (F <= -2.45e+35) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 4400000000.0) tmp = t_0; elseif (F <= 1.05e+147) tmp = Float64(Float64(t_1 + Float64(1.0 / B)) - Float64(x / B)); elseif (F <= 6e+210) tmp = t_0; else tmp = Float64(t_1 + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333)); tmp = 0.0; if (F <= -2.45e+35) tmp = (-1.0 / B) - (x / B); elseif (F <= 4400000000.0) tmp = t_0; elseif (F <= 1.05e+147) tmp = (t_1 + (1.0 / B)) - (x / B); elseif (F <= 6e+210) tmp = t_0; else tmp = t_1 + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.45e+35], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4400000000.0], t$95$0, If[LessEqual[F, 1.05e+147], N[(N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e+210], t$95$0, N[(t$95$1 + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\\
\mathbf{if}\;F \leq -2.45 \cdot 10^{+35}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4400000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{+147}:\\
\;\;\;\;\left(t_1 + \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+210}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.45000000000000013e35Initial program 46.5%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 66.1%
associate-*r/66.1%
distribute-lft-in66.1%
metadata-eval66.1%
neg-mul-166.1%
Simplified66.1%
Taylor expanded in x around 0 66.1%
sub-neg66.1%
mul-1-neg66.1%
+-commutative66.1%
distribute-neg-frac66.1%
metadata-eval66.1%
sub-neg66.1%
Simplified66.1%
if -2.45000000000000013e35 < F < 4.4e9 or 1.05000000000000003e147 < F < 6.00000000000000044e210Initial program 91.7%
Taylor expanded in F around -inf 43.2%
Taylor expanded in x around inf 69.9%
clear-num69.7%
inv-pow69.7%
*-un-lft-identity69.7%
*-commutative69.7%
times-frac69.6%
tan-quot69.7%
Applied egg-rr69.7%
unpow-169.7%
*-commutative69.7%
associate-*r/69.7%
*-commutative69.7%
*-lft-identity69.7%
associate-/r/69.8%
*-commutative69.8%
associate-*r/70.0%
*-rgt-identity70.0%
Simplified70.0%
if 4.4e9 < F < 1.05000000000000003e147Initial program 86.2%
+-commutative86.2%
unsub-neg86.2%
associate-*l/99.7%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
*-commutative99.5%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 63.4%
if 6.00000000000000044e210 < F Initial program 25.1%
+-commutative25.1%
unsub-neg25.1%
associate-*l/44.8%
associate-*r/44.8%
*-commutative44.8%
Simplified45.0%
Taylor expanded in F around inf 99.8%
*-commutative99.8%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in B around 0 69.1%
associate--l+69.1%
*-commutative69.1%
*-commutative69.1%
div-sub69.1%
Simplified69.1%
Final simplification68.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B)))
(t_1 (* B (+ 0.16666666666666666 (* x 0.3333333333333333)))))
(if (<= F -2.4e-29)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 22500000000.0)
t_0
(if (<= F 1.05e+147)
(- (+ t_1 (/ 1.0 B)) (/ x B))
(if (<= F 9.4e+210) t_0 (+ t_1 (/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double tmp;
if (F <= -2.4e-29) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 22500000000.0) {
tmp = t_0;
} else if (F <= 1.05e+147) {
tmp = (t_1 + (1.0 / B)) - (x / B);
} else if (F <= 9.4e+210) {
tmp = t_0;
} else {
tmp = t_1 + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))
if (f <= (-2.4d-29)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 22500000000.0d0) then
tmp = t_0
else if (f <= 1.05d+147) then
tmp = (t_1 + (1.0d0 / b)) - (x / b)
else if (f <= 9.4d+210) then
tmp = t_0
else
tmp = t_1 + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double tmp;
if (F <= -2.4e-29) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 22500000000.0) {
tmp = t_0;
} else if (F <= 1.05e+147) {
tmp = (t_1 + (1.0 / B)) - (x / B);
} else if (F <= 9.4e+210) {
tmp = t_0;
} else {
tmp = t_1 + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333)) tmp = 0 if F <= -2.4e-29: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 22500000000.0: tmp = t_0 elif F <= 1.05e+147: tmp = (t_1 + (1.0 / B)) - (x / B) elif F <= 9.4e+210: tmp = t_0 else: tmp = t_1 + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) tmp = 0.0 if (F <= -2.4e-29) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 22500000000.0) tmp = t_0; elseif (F <= 1.05e+147) tmp = Float64(Float64(t_1 + Float64(1.0 / B)) - Float64(x / B)); elseif (F <= 9.4e+210) tmp = t_0; else tmp = Float64(t_1 + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333)); tmp = 0.0; if (F <= -2.4e-29) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 22500000000.0) tmp = t_0; elseif (F <= 1.05e+147) tmp = (t_1 + (1.0 / B)) - (x / B); elseif (F <= 9.4e+210) tmp = t_0; else tmp = t_1 + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.4e-29], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 22500000000.0], t$95$0, If[LessEqual[F, 1.05e+147], N[(N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.4e+210], t$95$0, N[(t$95$1 + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{-29}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 22500000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{+147}:\\
\;\;\;\;\left(t_1 + \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.4 \cdot 10^{+210}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.39999999999999992e-29Initial program 51.3%
Taylor expanded in F around -inf 70.0%
Taylor expanded in B around 0 50.1%
Applied egg-rr76.6%
associate--r+76.6%
neg-sub076.6%
distribute-neg-frac76.6%
metadata-eval76.6%
Simplified76.6%
if -2.39999999999999992e-29 < F < 2.25e10 or 1.05000000000000003e147 < F < 9.4000000000000001e210Initial program 91.3%
Taylor expanded in F around -inf 42.2%
Taylor expanded in x around inf 72.6%
clear-num72.4%
inv-pow72.4%
*-un-lft-identity72.4%
*-commutative72.4%
times-frac72.3%
tan-quot72.5%
Applied egg-rr72.5%
unpow-172.5%
*-commutative72.5%
associate-*r/72.5%
*-commutative72.5%
*-lft-identity72.5%
associate-/r/72.5%
*-commutative72.5%
associate-*r/72.7%
*-rgt-identity72.7%
Simplified72.7%
if 2.25e10 < F < 1.05000000000000003e147Initial program 86.2%
+-commutative86.2%
unsub-neg86.2%
associate-*l/99.7%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
*-commutative99.5%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 63.4%
if 9.4000000000000001e210 < F Initial program 25.1%
+-commutative25.1%
unsub-neg25.1%
associate-*l/44.8%
associate-*r/44.8%
*-commutative44.8%
Simplified45.0%
Taylor expanded in F around inf 99.8%
*-commutative99.8%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in B around 0 69.1%
associate--l+69.1%
*-commutative69.1%
*-commutative69.1%
div-sub69.1%
Simplified69.1%
Final simplification72.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B)))
(t_1 (* B (+ 0.16666666666666666 (* x 0.3333333333333333)))))
(if (<= F -1.9e-49)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 22000000000.0)
t_0
(if (<= F 9.5e+146)
(- (+ t_1 (/ 1.0 B)) (/ x B))
(if (<= F 6.4e+210) t_0 (+ t_1 (/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double tmp;
if (F <= -1.9e-49) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 22000000000.0) {
tmp = t_0;
} else if (F <= 9.5e+146) {
tmp = (t_1 + (1.0 / B)) - (x / B);
} else if (F <= 6.4e+210) {
tmp = t_0;
} else {
tmp = t_1 + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))
if (f <= (-1.9d-49)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 22000000000.0d0) then
tmp = t_0
else if (f <= 9.5d+146) then
tmp = (t_1 + (1.0d0 / b)) - (x / b)
else if (f <= 6.4d+210) then
tmp = t_0
else
tmp = t_1 + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333));
double tmp;
if (F <= -1.9e-49) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 22000000000.0) {
tmp = t_0;
} else if (F <= 9.5e+146) {
tmp = (t_1 + (1.0 / B)) - (x / B);
} else if (F <= 6.4e+210) {
tmp = t_0;
} else {
tmp = t_1 + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333)) tmp = 0 if F <= -1.9e-49: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 22000000000.0: tmp = t_0 elif F <= 9.5e+146: tmp = (t_1 + (1.0 / B)) - (x / B) elif F <= 6.4e+210: tmp = t_0 else: tmp = t_1 + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) tmp = 0.0 if (F <= -1.9e-49) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 22000000000.0) tmp = t_0; elseif (F <= 9.5e+146) tmp = Float64(Float64(t_1 + Float64(1.0 / B)) - Float64(x / B)); elseif (F <= 6.4e+210) tmp = t_0; else tmp = Float64(t_1 + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = B * (0.16666666666666666 + (x * 0.3333333333333333)); tmp = 0.0; if (F <= -1.9e-49) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 22000000000.0) tmp = t_0; elseif (F <= 9.5e+146) tmp = (t_1 + (1.0 / B)) - (x / B); elseif (F <= 6.4e+210) tmp = t_0; else tmp = t_1 + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e-49], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 22000000000.0], t$95$0, If[LessEqual[F, 9.5e+146], N[(N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.4e+210], t$95$0, N[(t$95$1 + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 22000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+146}:\\
\;\;\;\;\left(t_1 + \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{+210}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.8999999999999999e-49Initial program 53.7%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 77.3%
if -1.8999999999999999e-49 < F < 2.2e10 or 9.49999999999999926e146 < F < 6.4000000000000005e210Initial program 91.1%
Taylor expanded in F around -inf 43.3%
Taylor expanded in x around inf 74.8%
clear-num74.6%
inv-pow74.6%
*-un-lft-identity74.6%
*-commutative74.6%
times-frac74.5%
tan-quot74.6%
Applied egg-rr74.6%
unpow-174.6%
*-commutative74.6%
associate-*r/74.7%
*-commutative74.7%
*-lft-identity74.7%
associate-/r/74.7%
*-commutative74.7%
associate-*r/74.9%
*-rgt-identity74.9%
Simplified74.9%
if 2.2e10 < F < 9.49999999999999926e146Initial program 86.2%
+-commutative86.2%
unsub-neg86.2%
associate-*l/99.7%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
*-commutative99.5%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 63.4%
if 6.4000000000000005e210 < F Initial program 25.1%
+-commutative25.1%
unsub-neg25.1%
associate-*l/44.8%
associate-*r/44.8%
*-commutative44.8%
Simplified45.0%
Taylor expanded in F around inf 99.8%
*-commutative99.8%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in B around 0 69.1%
associate--l+69.1%
*-commutative69.1%
*-commutative69.1%
div-sub69.1%
Simplified69.1%
Final simplification73.9%
(FPCore (F B x)
:precision binary64
(if (<= F -2.45e+35)
(- (/ -1.0 B) (/ x B))
(if (<= F 4400000000.0)
(/ (- x) (sin B))
(-
(+ (* B (+ 0.16666666666666666 (* x 0.3333333333333333))) (/ 1.0 B))
(/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.45e+35) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 4400000000.0) {
tmp = -x / sin(B);
} else {
tmp = ((B * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 / B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.45d+35)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 4400000000.0d0) then
tmp = -x / sin(b)
else
tmp = ((b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + (1.0d0 / b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.45e+35) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 4400000000.0) {
tmp = -x / Math.sin(B);
} else {
tmp = ((B * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 / B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.45e+35: tmp = (-1.0 / B) - (x / B) elif F <= 4400000000.0: tmp = -x / math.sin(B) else: tmp = ((B * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 / B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.45e+35) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 4400000000.0) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(1.0 / B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.45e+35) tmp = (-1.0 / B) - (x / B); elseif (F <= 4400000000.0) tmp = -x / sin(B); else tmp = ((B * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 / B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.45e+35], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4400000000.0], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.45 \cdot 10^{+35}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4400000000:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1}{B}\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.45000000000000013e35Initial program 46.5%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 66.1%
associate-*r/66.1%
distribute-lft-in66.1%
metadata-eval66.1%
neg-mul-166.1%
Simplified66.1%
Taylor expanded in x around 0 66.1%
sub-neg66.1%
mul-1-neg66.1%
+-commutative66.1%
distribute-neg-frac66.1%
metadata-eval66.1%
sub-neg66.1%
Simplified66.1%
if -2.45000000000000013e35 < F < 4.4e9Initial program 99.6%
Taylor expanded in F around -inf 40.2%
Taylor expanded in x around inf 71.3%
Taylor expanded in B around 0 43.6%
if 4.4e9 < F Initial program 56.5%
+-commutative56.5%
unsub-neg56.5%
associate-*l/72.3%
associate-*r/72.3%
*-commutative72.3%
Simplified72.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 57.5%
Final simplification53.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.9e-49)
(- (/ -1.0 B) (/ x B))
(if (<= F 2.5e-9)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(-
(+ (* B (+ 0.16666666666666666 (* x 0.3333333333333333))) (/ 1.0 B))
(/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 2.5e-9) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = ((B * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 / B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.9d-49)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 2.5d-9) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = ((b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + (1.0d0 / b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 2.5e-9) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = ((B * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 / B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e-49: tmp = (-1.0 / B) - (x / B) elif F <= 2.5e-9: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = ((B * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 / B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e-49) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 2.5e-9) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(1.0 / B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e-49) tmp = (-1.0 / B) - (x / B); elseif (F <= 2.5e-9) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = ((B * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 / B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e-49], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-9], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\left(B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1}{B}\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.8999999999999999e-49Initial program 53.7%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 58.9%
associate-*r/58.9%
distribute-lft-in58.9%
metadata-eval58.9%
neg-mul-158.9%
Simplified58.9%
Taylor expanded in x around 0 59.0%
sub-neg59.0%
mul-1-neg59.0%
+-commutative59.0%
distribute-neg-frac59.0%
metadata-eval59.0%
sub-neg59.0%
Simplified59.0%
if -1.8999999999999999e-49 < F < 2.5000000000000001e-9Initial program 99.6%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 78.3%
Taylor expanded in B around 0 45.3%
*-commutative45.3%
distribute-rgt-out--45.3%
metadata-eval45.3%
Simplified45.3%
if 2.5000000000000001e-9 < F Initial program 58.8%
+-commutative58.8%
unsub-neg58.8%
associate-*l/73.8%
associate-*r/73.7%
*-commutative73.7%
Simplified73.8%
Taylor expanded in F around inf 97.9%
*-commutative97.9%
associate-/r*97.9%
Simplified97.9%
Taylor expanded in B around 0 55.8%
Final simplification52.7%
(FPCore (F B x)
:precision binary64
(if (<= F -6.2e-50)
(- (/ -1.0 B) (/ x B))
(if (<= F 2.5e-9)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-50) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 2.5e-9) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.2d-50)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 2.5d-9) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-50) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 2.5e-9) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e-50: tmp = (-1.0 / B) - (x / B) elif F <= 2.5e-9: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e-50) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 2.5e-9) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.2e-50) tmp = (-1.0 / B) - (x / B); elseif (F <= 2.5e-9) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e-50], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-9], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.2000000000000004e-50Initial program 53.7%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 58.9%
associate-*r/58.9%
distribute-lft-in58.9%
metadata-eval58.9%
neg-mul-158.9%
Simplified58.9%
Taylor expanded in x around 0 59.0%
sub-neg59.0%
mul-1-neg59.0%
+-commutative59.0%
distribute-neg-frac59.0%
metadata-eval59.0%
sub-neg59.0%
Simplified59.0%
if -6.2000000000000004e-50 < F < 2.5000000000000001e-9Initial program 99.6%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 78.3%
Taylor expanded in B around 0 45.3%
*-commutative45.3%
distribute-rgt-out--45.3%
metadata-eval45.3%
Simplified45.3%
if 2.5000000000000001e-9 < F Initial program 58.8%
+-commutative58.8%
unsub-neg58.8%
associate-*l/73.8%
associate-*r/73.7%
*-commutative73.7%
Simplified73.8%
Taylor expanded in F around inf 97.9%
*-commutative97.9%
associate-/r*97.9%
Simplified97.9%
Taylor expanded in B around 0 55.8%
associate--l+55.8%
*-commutative55.8%
*-commutative55.8%
div-sub55.8%
Simplified55.8%
Final simplification52.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.42e-49)
(- (/ -1.0 B) (/ x B))
(if (<= F 1.8e-9)
(- (/ (- x) B) (* -0.3333333333333333 (* B x)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.8e-9) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.42d-49)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.8d-9) then
tmp = (-x / b) - ((-0.3333333333333333d0) * (b * x))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.8e-9) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.42e-49: tmp = (-1.0 / B) - (x / B) elif F <= 1.8e-9: tmp = (-x / B) - (-0.3333333333333333 * (B * x)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.42e-49) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.8e-9) tmp = Float64(Float64(Float64(-x) / B) - Float64(-0.3333333333333333 * Float64(B * x))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.42e-49) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.8e-9) tmp = (-x / B) - (-0.3333333333333333 * (B * x)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.42e-49], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-9], N[(N[((-x) / B), $MachinePrecision] - N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.42 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-x}{B} - -0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.42e-49Initial program 53.7%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 58.9%
associate-*r/58.9%
distribute-lft-in58.9%
metadata-eval58.9%
neg-mul-158.9%
Simplified58.9%
Taylor expanded in x around 0 59.0%
sub-neg59.0%
mul-1-neg59.0%
+-commutative59.0%
distribute-neg-frac59.0%
metadata-eval59.0%
sub-neg59.0%
Simplified59.0%
if -1.42e-49 < F < 1.8e-9Initial program 99.6%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 78.3%
Taylor expanded in B around 0 45.3%
Taylor expanded in x around 0 45.3%
if 1.8e-9 < F Initial program 58.8%
+-commutative58.8%
unsub-neg58.8%
associate-*l/73.8%
associate-*r/73.7%
*-commutative73.7%
Simplified73.8%
Taylor expanded in F around inf 97.9%
*-commutative97.9%
associate-/r*97.9%
Simplified97.9%
Taylor expanded in B around 0 55.5%
Final simplification52.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.2e-49)
(- (/ -1.0 B) (/ x B))
(if (<= F 1.8e-9)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.8e-9) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.2d-49)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.8d-9) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.8e-9) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2e-49: tmp = (-1.0 / B) - (x / B) elif F <= 1.8e-9: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.2e-49) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.8e-9) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.2e-49) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.8e-9) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2e-49], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-9], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.19999999999999996e-49Initial program 53.7%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 58.9%
associate-*r/58.9%
distribute-lft-in58.9%
metadata-eval58.9%
neg-mul-158.9%
Simplified58.9%
Taylor expanded in x around 0 59.0%
sub-neg59.0%
mul-1-neg59.0%
+-commutative59.0%
distribute-neg-frac59.0%
metadata-eval59.0%
sub-neg59.0%
Simplified59.0%
if -1.19999999999999996e-49 < F < 1.8e-9Initial program 99.6%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 78.3%
Taylor expanded in B around 0 45.3%
*-commutative45.3%
distribute-rgt-out--45.3%
metadata-eval45.3%
Simplified45.3%
if 1.8e-9 < F Initial program 58.8%
+-commutative58.8%
unsub-neg58.8%
associate-*l/73.8%
associate-*r/73.7%
*-commutative73.7%
Simplified73.8%
Taylor expanded in F around inf 97.9%
*-commutative97.9%
associate-/r*97.9%
Simplified97.9%
Taylor expanded in B around 0 55.5%
Final simplification52.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.12e-49)
(- (/ -1.0 B) (/ x B))
(if (<= F 2.5e-9)
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.12e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 2.5e-9) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.12d-49)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 2.5d-9) then
tmp = x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.12e-49) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 2.5e-9) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.12e-49: tmp = (-1.0 / B) - (x / B) elif F <= 2.5e-9: tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.12e-49) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 2.5e-9) tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.12e-49) tmp = (-1.0 / B) - (x / B); elseif (F <= 2.5e-9) tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.12e-49], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-9], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.12 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.1199999999999999e-49Initial program 53.7%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 58.9%
associate-*r/58.9%
distribute-lft-in58.9%
metadata-eval58.9%
neg-mul-158.9%
Simplified58.9%
Taylor expanded in x around 0 59.0%
sub-neg59.0%
mul-1-neg59.0%
+-commutative59.0%
distribute-neg-frac59.0%
metadata-eval59.0%
sub-neg59.0%
Simplified59.0%
if -1.1199999999999999e-49 < F < 2.5000000000000001e-9Initial program 99.6%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 78.3%
Taylor expanded in B around 0 45.3%
Taylor expanded in x around 0 45.2%
if 2.5000000000000001e-9 < F Initial program 58.8%
+-commutative58.8%
unsub-neg58.8%
associate-*l/73.8%
associate-*r/73.7%
*-commutative73.7%
Simplified73.8%
Taylor expanded in F around inf 97.9%
*-commutative97.9%
associate-/r*97.9%
Simplified97.9%
Taylor expanded in B around 0 55.5%
Final simplification52.5%
(FPCore (F B x) :precision binary64 (if (<= F -9e-10) (/ -1.0 B) (if (<= F 1.15e-36) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-10) {
tmp = -1.0 / B;
} else if (F <= 1.15e-36) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9d-10)) then
tmp = (-1.0d0) / b
else if (f <= 1.15d-36) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9e-10) {
tmp = -1.0 / B;
} else if (F <= 1.15e-36) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-10: tmp = -1.0 / B elif F <= 1.15e-36: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-10) tmp = Float64(-1.0 / B); elseif (F <= 1.15e-36) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e-10) tmp = -1.0 / B; elseif (F <= 1.15e-36) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-10], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.15e-36], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-36}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.9999999999999999e-10Initial program 50.0%
Taylor expanded in F around -inf 97.5%
Taylor expanded in B around 0 62.0%
associate-*r/62.0%
distribute-lft-in62.0%
metadata-eval62.0%
neg-mul-162.0%
Simplified62.0%
Taylor expanded in x around 0 39.7%
if -8.9999999999999999e-10 < F < 1.14999999999999998e-36Initial program 99.6%
Taylor expanded in F around -inf 38.3%
Taylor expanded in B around 0 24.3%
associate-*r/24.3%
distribute-lft-in24.3%
metadata-eval24.3%
neg-mul-124.3%
Simplified24.3%
Taylor expanded in x around inf 44.9%
mul-1-neg44.9%
distribute-neg-frac44.9%
Simplified44.9%
if 1.14999999999999998e-36 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/75.8%
associate-*r/75.7%
*-commutative75.7%
Simplified75.8%
Taylor expanded in F around inf 94.3%
*-commutative94.3%
associate-/r*94.4%
Simplified94.4%
Taylor expanded in B around 0 52.8%
Final simplification45.9%
(FPCore (F B x) :precision binary64 (if (<= F -2.2e-46) (/ (- -1.0 x) B) (if (<= F 2.75e-36) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.75e-36) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.2d-46)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.75d-36) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.75e-36) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.2e-46: tmp = (-1.0 - x) / B elif F <= 2.75e-36: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.2e-46) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.75e-36) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.2e-46) tmp = (-1.0 - x) / B; elseif (F <= 2.75e-36) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.2e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.75e-36], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.75 \cdot 10^{-36}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.2000000000000001e-46Initial program 53.1%
Taylor expanded in F around -inf 93.1%
Taylor expanded in B around 0 59.6%
associate-*r/59.6%
distribute-lft-in59.6%
metadata-eval59.6%
neg-mul-159.6%
Simplified59.6%
if -2.2000000000000001e-46 < F < 2.74999999999999992e-36Initial program 99.6%
Taylor expanded in F around -inf 38.9%
Taylor expanded in B around 0 24.3%
associate-*r/24.3%
distribute-lft-in24.3%
metadata-eval24.3%
neg-mul-124.3%
Simplified24.3%
Taylor expanded in x around inf 46.0%
mul-1-neg46.0%
distribute-neg-frac46.0%
Simplified46.0%
if 2.74999999999999992e-36 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/75.8%
associate-*r/75.7%
*-commutative75.7%
Simplified75.8%
Taylor expanded in F around inf 94.3%
*-commutative94.3%
associate-/r*94.4%
Simplified94.4%
Taylor expanded in B around 0 52.8%
Final simplification52.4%
(FPCore (F B x) :precision binary64 (if (<= F -2.2e-46) (- (/ -1.0 B) (/ x B)) (if (<= F 1.15e-36) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-46) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.15e-36) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.2d-46)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.15d-36) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-46) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.15e-36) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.2e-46: tmp = (-1.0 / B) - (x / B) elif F <= 1.15e-36: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.2e-46) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.15e-36) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.2e-46) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.15e-36) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.2e-46], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.15e-36], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-36}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.2000000000000001e-46Initial program 53.1%
Taylor expanded in F around -inf 93.1%
Taylor expanded in B around 0 59.6%
associate-*r/59.6%
distribute-lft-in59.6%
metadata-eval59.6%
neg-mul-159.6%
Simplified59.6%
Taylor expanded in x around 0 59.7%
sub-neg59.7%
mul-1-neg59.7%
+-commutative59.7%
distribute-neg-frac59.7%
metadata-eval59.7%
sub-neg59.7%
Simplified59.7%
if -2.2000000000000001e-46 < F < 1.14999999999999998e-36Initial program 99.6%
Taylor expanded in F around -inf 38.9%
Taylor expanded in B around 0 24.3%
associate-*r/24.3%
distribute-lft-in24.3%
metadata-eval24.3%
neg-mul-124.3%
Simplified24.3%
Taylor expanded in x around inf 46.0%
mul-1-neg46.0%
distribute-neg-frac46.0%
Simplified46.0%
if 1.14999999999999998e-36 < F Initial program 61.9%
+-commutative61.9%
unsub-neg61.9%
associate-*l/75.8%
associate-*r/75.7%
*-commutative75.7%
Simplified75.8%
Taylor expanded in F around inf 94.3%
*-commutative94.3%
associate-/r*94.4%
Simplified94.4%
Taylor expanded in B around 0 52.8%
Final simplification52.4%
(FPCore (F B x) :precision binary64 (if (or (<= x -2e-31) (not (<= x 1.85e-94))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2e-31) || !(x <= 1.85e-94)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2d-31)) .or. (.not. (x <= 1.85d-94))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2e-31) || !(x <= 1.85e-94)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2e-31) or not (x <= 1.85e-94): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2e-31) || !(x <= 1.85e-94)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2e-31) || ~((x <= 1.85e-94))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2e-31], N[Not[LessEqual[x, 1.85e-94]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{-31} \lor \neg \left(x \leq 1.85 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -2e-31 or 1.8499999999999999e-94 < x Initial program 80.8%
Taylor expanded in F around -inf 77.8%
Taylor expanded in B around 0 45.6%
associate-*r/45.6%
distribute-lft-in45.6%
metadata-eval45.6%
neg-mul-145.6%
Simplified45.6%
Taylor expanded in x around inf 53.2%
mul-1-neg53.2%
distribute-neg-frac53.2%
Simplified53.2%
if -2e-31 < x < 1.8499999999999999e-94Initial program 64.0%
Taylor expanded in F around -inf 34.8%
Taylor expanded in B around 0 24.6%
associate-*r/24.6%
distribute-lft-in24.6%
metadata-eval24.6%
neg-mul-124.6%
Simplified24.6%
Taylor expanded in x around 0 24.6%
Final simplification40.3%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 73.3%
Taylor expanded in F around -inf 58.5%
Taylor expanded in B around 0 36.2%
associate-*r/36.2%
distribute-lft-in36.2%
metadata-eval36.2%
neg-mul-136.2%
Simplified36.2%
Taylor expanded in x around 0 14.4%
Final simplification14.4%
herbie shell --seed 2023203
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))