
(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.12e+45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 165000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) 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.12e+45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 165000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - 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.12d+45)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 165000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - 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.12e+45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 165000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - 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.12e+45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 165000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - 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.12e+45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 165000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - 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.12e+45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 165000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - 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.12e+45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 165000000.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] - 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.12 \cdot 10^{+45}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 165000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.12e45Initial program 55.2%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -1.12e45 < F < 1.65e8Initial program 99.4%
div-inv99.6%
expm1-log1p-u73.0%
expm1-udef53.9%
Applied egg-rr53.9%
expm1-def73.0%
expm1-log1p99.6%
Simplified99.6%
if 1.65e8 < F Initial program 54.7%
Taylor expanded in B around inf 54.6%
Taylor expanded in F around inf 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*r/99.8%
associate-/l*99.7%
quot-tan99.8%
Applied egg-rr99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -22000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.8e-7)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.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 <= -22000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.8e-7) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.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 <= (-22000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.8d-7) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
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 <= -22000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.8e-7) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.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 <= -22000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.8e-7: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.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 <= -22000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.8e-7) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.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 <= -22000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.8e-7) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.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, -22000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.8e-7], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $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 -22000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2e10Initial program 57.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -2.2e10 < F < 1.79999999999999997e-7Initial program 99.4%
Taylor expanded in F around 0 99.4%
if 1.79999999999999997e-7 < F Initial program 56.9%
Taylor expanded in B around inf 56.8%
Taylor expanded in F around inf 98.6%
+-commutative98.6%
unsub-neg98.6%
associate-*r/98.6%
associate-/l*98.6%
quot-tan98.6%
Applied egg-rr98.6%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -22000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.8e-7)
(+
(* x (/ -1.0 (tan B)))
(/ F (/ (sin B) (sqrt (/ 1.0 (+ 2.0 (* x 2.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 <= -22000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.8e-7) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) / sqrt((1.0 / (2.0 + (x * 2.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 <= (-22000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.8d-7) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) / sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))))
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 <= -22000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.8e-7) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) / Math.sqrt((1.0 / (2.0 + (x * 2.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 <= -22000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.8e-7: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) / math.sqrt((1.0 / (2.0 + (x * 2.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 <= -22000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.8e-7) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) / sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.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 <= -22000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.8e-7) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) / sqrt((1.0 / (2.0 + (x * 2.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, -22000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.8e-7], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 -22000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\frac{\sin B}{\sqrt{\frac{1}{2 + x \cdot 2}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2e10Initial program 57.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -2.2e10 < F < 1.79999999999999997e-7Initial program 99.4%
associate-*l/99.4%
associate-/l*99.4%
+-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.4%
if 1.79999999999999997e-7 < F Initial program 56.9%
Taylor expanded in B around inf 56.8%
Taylor expanded in F around inf 98.6%
+-commutative98.6%
unsub-neg98.6%
associate-*r/98.6%
associate-/l*98.6%
quot-tan98.6%
Applied egg-rr98.6%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -22000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.8e-7)
(+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.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 <= -22000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.8e-7) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.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 <= (-22000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.8d-7) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
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 <= -22000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.8e-7) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.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 <= -22000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.8e-7: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.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 <= -22000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.8e-7) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.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 <= -22000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.8e-7) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.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, -22000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.8e-7], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $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 -22000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2e10Initial program 57.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -2.2e10 < F < 1.79999999999999997e-7Initial program 99.4%
associate-*l/99.4%
associate-/l*99.4%
+-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.4%
if 1.79999999999999997e-7 < F Initial program 56.9%
Taylor expanded in B around inf 56.8%
Taylor expanded in F around inf 98.6%
+-commutative98.6%
unsub-neg98.6%
associate-*r/98.6%
associate-/l*98.6%
quot-tan98.6%
Applied egg-rr98.6%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -22000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.5e-151)
(+ (* x (/ -1.0 (tan B))) (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(if (<= F 86000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x 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 <= -22000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.5e-151) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else if (F <= 86000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / 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 <= (-22000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6.5d-151) then
tmp = (x * ((-1.0d0) / tan(b))) + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else if (f <= 86000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / 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 <= -22000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6.5e-151) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else if (F <= 86000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / 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 <= -22000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6.5e-151: tmp = (x * (-1.0 / math.tan(B))) + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) elif F <= 86000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / 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 <= -22000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.5e-151) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); elseif (F <= 86000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / 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 <= -22000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6.5e-151) tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); elseif (F <= 86000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / 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, -22000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.5e-151], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 86000.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 / 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 -22000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-151}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 86000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2e10Initial program 57.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -2.2e10 < F < 6.4999999999999994e-151Initial program 99.4%
Taylor expanded in B around 0 88.9%
Taylor expanded in F around 0 88.9%
if 6.4999999999999994e-151 < F < 86000Initial program 99.5%
Taylor expanded in B around 0 85.1%
if 86000 < F Initial program 54.7%
Taylor expanded in B around inf 54.6%
Taylor expanded in F around inf 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*r/99.8%
associate-/l*99.7%
quot-tan99.8%
Applied egg-rr99.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -600.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.25e-152)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 2200000.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -600.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.25e-152) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 2200000.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} 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 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-600.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.25d-152) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 2200000.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
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.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -600.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.25e-152) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 2200000.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -600.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.25e-152: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 2200000.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -600.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.25e-152) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 2200000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -600.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.25e-152) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 2200000.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -600.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.25e-152], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2200000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -600:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-152}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 2200000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -600Initial program 58.4%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -600 < F < 1.2499999999999999e-152Initial program 99.4%
Taylor expanded in B around 0 88.7%
div-inv89.0%
clear-num88.8%
Applied egg-rr88.8%
if 1.2499999999999999e-152 < F < 2.2e6Initial program 99.5%
Taylor expanded in B around 0 85.1%
if 2.2e6 < F Initial program 54.7%
Taylor expanded in B around inf 54.6%
Taylor expanded in F around inf 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*r/99.8%
associate-/l*99.7%
quot-tan99.8%
Applied egg-rr99.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -22000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.8e-7)
(+ (* x (/ -1.0 (tan B))) (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F 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 <= -22000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.8e-7) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / 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 <= (-22000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.8d-7) then
tmp = (x * ((-1.0d0) / tan(b))) + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / 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 <= -22000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.8e-7) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / 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 <= -22000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.8e-7: tmp = (x * (-1.0 / math.tan(B))) + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / 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 <= -22000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.8e-7) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / 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 <= -22000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.8e-7) tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / 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, -22000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.8e-7], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $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 -22000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2e10Initial program 57.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -2.2e10 < F < 1.79999999999999997e-7Initial program 99.4%
Taylor expanded in B around 0 81.2%
Taylor expanded in F around 0 81.2%
if 1.79999999999999997e-7 < F Initial program 56.9%
Taylor expanded in B around inf 56.8%
Taylor expanded in F around inf 98.6%
+-commutative98.6%
unsub-neg98.6%
associate-*r/98.6%
associate-/l*98.6%
quot-tan98.6%
Applied egg-rr98.6%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.1e-108)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7.8e-60)
(* (/ x (sin B)) (- (cos 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.1e-108) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7.8e-60) {
tmp = (x / sin(B)) * -cos(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.1d-108)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7.8d-60) then
tmp = (x / sin(b)) * -cos(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.1e-108) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7.8e-60) {
tmp = (x / Math.sin(B)) * -Math.cos(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.1e-108: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7.8e-60: tmp = (x / math.sin(B)) * -math.cos(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.1e-108) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7.8e-60) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(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.1e-108) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7.8e-60) tmp = (x / sin(B)) * -cos(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.1e-108], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.8e-60], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[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 -1.1 \cdot 10^{-108}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-60}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.1000000000000001e-108Initial program 66.4%
Taylor expanded in F around -inf 91.3%
+-commutative91.3%
unsub-neg91.3%
un-div-inv91.4%
Applied egg-rr91.4%
if -1.1000000000000001e-108 < F < 7.8000000000000004e-60Initial program 99.4%
Taylor expanded in B around inf 99.4%
Taylor expanded in F around inf 34.0%
Taylor expanded in x around inf 74.1%
mul-1-neg74.1%
associate-*l/74.1%
distribute-rgt-neg-in74.1%
Simplified74.1%
if 7.8000000000000004e-60 < F Initial program 60.6%
Taylor expanded in B around inf 60.5%
Taylor expanded in F around inf 94.6%
+-commutative94.6%
unsub-neg94.6%
associate-*r/94.7%
associate-/l*94.6%
quot-tan94.7%
Applied egg-rr94.7%
Final simplification87.2%
(FPCore (F B x)
:precision binary64
(if (<= F -22000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.7e-38)
(* (/ x (sin B)) (- (cos B)))
(if (or (<= F 6.1e+175) (not (<= F 7e+219)))
(- (/ 1.0 (sin B)) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -22000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.7e-38) {
tmp = (x / sin(B)) * -cos(B);
} else if ((F <= 6.1e+175) || !(F <= 7e+219)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (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 (f <= (-22000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.7d-38) then
tmp = (x / sin(b)) * -cos(b)
else if ((f <= 6.1d+175) .or. (.not. (f <= 7d+219))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -22000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.7e-38) {
tmp = (x / Math.sin(B)) * -Math.cos(B);
} else if ((F <= 6.1e+175) || !(F <= 7e+219)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -22000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.7e-38: tmp = (x / math.sin(B)) * -math.cos(B) elif (F <= 6.1e+175) or not (F <= 7e+219): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -22000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.7e-38) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); elseif ((F <= 6.1e+175) || !(F <= 7e+219)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -22000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.7e-38) tmp = (x / sin(B)) * -cos(B); elseif ((F <= 6.1e+175) || ~((F <= 7e+219))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -22000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-38], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[F, 6.1e+175], N[Not[LessEqual[F, 7e+219]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -22000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 6.1 \cdot 10^{+175} \lor \neg \left(F \leq 7 \cdot 10^{+219}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.2e10Initial program 57.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 74.8%
if -2.2e10 < F < 2.70000000000000005e-38Initial program 99.4%
Taylor expanded in B around inf 99.4%
Taylor expanded in F around inf 39.0%
Taylor expanded in x around inf 70.8%
mul-1-neg70.8%
associate-*l/70.8%
distribute-rgt-neg-in70.8%
Simplified70.8%
if 2.70000000000000005e-38 < F < 6.0999999999999997e175 or 7.0000000000000002e219 < F Initial program 60.1%
Taylor expanded in B around inf 60.0%
Taylor expanded in F around inf 94.8%
Taylor expanded in B around 0 87.3%
if 6.0999999999999997e175 < F < 7.0000000000000002e219Initial program 54.7%
Taylor expanded in B around 0 54.7%
Taylor expanded in F around inf 92.3%
Final simplification77.7%
(FPCore (F B x)
:precision binary64
(if (<= F -22000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.7e-38)
(/ (- x) (/ (sin B) (cos B)))
(if (or (<= F 1.22e+176) (not (<= F 9.8e+219)))
(- (/ 1.0 (sin B)) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -22000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.7e-38) {
tmp = -x / (sin(B) / cos(B));
} else if ((F <= 1.22e+176) || !(F <= 9.8e+219)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (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 (f <= (-22000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.7d-38) then
tmp = -x / (sin(b) / cos(b))
else if ((f <= 1.22d+176) .or. (.not. (f <= 9.8d+219))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -22000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.7e-38) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if ((F <= 1.22e+176) || !(F <= 9.8e+219)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -22000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.7e-38: tmp = -x / (math.sin(B) / math.cos(B)) elif (F <= 1.22e+176) or not (F <= 9.8e+219): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -22000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.7e-38) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif ((F <= 1.22e+176) || !(F <= 9.8e+219)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -22000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.7e-38) tmp = -x / (sin(B) / cos(B)); elseif ((F <= 1.22e+176) || ~((F <= 9.8e+219))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -22000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-38], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.22e+176], N[Not[LessEqual[F, 9.8e+219]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -22000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-38}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{+176} \lor \neg \left(F \leq 9.8 \cdot 10^{+219}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.2e10Initial program 57.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 74.8%
if -2.2e10 < F < 2.70000000000000005e-38Initial program 99.4%
Taylor expanded in F around -inf 39.3%
Taylor expanded in x around inf 70.8%
mul-1-neg70.8%
associate-/l*70.8%
distribute-neg-frac70.8%
Simplified70.8%
if 2.70000000000000005e-38 < F < 1.2199999999999999e176 or 9.80000000000000007e219 < F Initial program 60.1%
Taylor expanded in B around inf 60.0%
Taylor expanded in F around inf 94.8%
Taylor expanded in B around 0 87.3%
if 1.2199999999999999e176 < F < 9.80000000000000007e219Initial program 54.7%
Taylor expanded in B around 0 54.7%
Taylor expanded in F around inf 92.3%
Final simplification77.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.1e-108)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 2.7e-38)
(* (/ x (sin B)) (- (cos B)))
(if (or (<= F 2.25e+182) (not (<= F 9.5e+219)))
(- (/ 1.0 (sin B)) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-108) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 2.7e-38) {
tmp = (x / sin(B)) * -cos(B);
} else if ((F <= 2.25e+182) || !(F <= 9.5e+219)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (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 (f <= (-1.1d-108)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 2.7d-38) then
tmp = (x / sin(b)) * -cos(b)
else if ((f <= 2.25d+182) .or. (.not. (f <= 9.5d+219))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-108) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 2.7e-38) {
tmp = (x / Math.sin(B)) * -Math.cos(B);
} else if ((F <= 2.25e+182) || !(F <= 9.5e+219)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e-108: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 2.7e-38: tmp = (x / math.sin(B)) * -math.cos(B) elif (F <= 2.25e+182) or not (F <= 9.5e+219): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e-108) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 2.7e-38) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); elseif ((F <= 2.25e+182) || !(F <= 9.5e+219)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.1e-108) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 2.7e-38) tmp = (x / sin(B)) * -cos(B); elseif ((F <= 2.25e+182) || ~((F <= 9.5e+219))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e-108], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-38], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[F, 2.25e+182], N[Not[LessEqual[F, 9.5e+219]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{-108}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{+182} \lor \neg \left(F \leq 9.5 \cdot 10^{+219}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.1000000000000001e-108Initial program 66.4%
Taylor expanded in F around -inf 91.3%
+-commutative91.3%
unsub-neg91.3%
un-div-inv91.4%
Applied egg-rr91.4%
if -1.1000000000000001e-108 < F < 2.70000000000000005e-38Initial program 99.5%
Taylor expanded in B around inf 99.4%
Taylor expanded in F around inf 35.2%
Taylor expanded in x around inf 73.8%
mul-1-neg73.8%
associate-*l/73.9%
distribute-rgt-neg-in73.9%
Simplified73.9%
if 2.70000000000000005e-38 < F < 2.25000000000000015e182 or 9.49999999999999959e219 < F Initial program 60.1%
Taylor expanded in B around inf 60.0%
Taylor expanded in F around inf 94.8%
Taylor expanded in B around 0 87.3%
if 2.25000000000000015e182 < F < 9.49999999999999959e219Initial program 54.7%
Taylor expanded in B around 0 54.7%
Taylor expanded in F around inf 92.3%
Final simplification84.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -0.0045)
(+ t_1 (/ -1.0 B))
(if (<= F -3.3e-224)
t_0
(if (<= F 1.92e-193)
(+ t_1 (* (/ F B) (/ 1.0 F)))
(if (<= F 3.1e-66)
t_0
(if (or (<= F 6.8e+57) (and (not (<= F 5.1e+177)) (<= F 2.2e+220)))
(+ t_1 (/ 1.0 B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.0045) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -3.3e-224) {
tmp = t_0;
} else if (F <= 1.92e-193) {
tmp = t_1 + ((F / B) * (1.0 / F));
} else if (F <= 3.1e-66) {
tmp = t_0;
} else if ((F <= 6.8e+57) || (!(F <= 5.1e+177) && (F <= 2.2e+220))) {
tmp = t_1 + (1.0 / B);
} else {
tmp = (1.0 / sin(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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-0.0045d0)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-3.3d-224)) then
tmp = t_0
else if (f <= 1.92d-193) then
tmp = t_1 + ((f / b) * (1.0d0 / f))
else if (f <= 3.1d-66) then
tmp = t_0
else if ((f <= 6.8d+57) .or. (.not. (f <= 5.1d+177)) .and. (f <= 2.2d+220)) then
tmp = t_1 + (1.0d0 / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.0045) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -3.3e-224) {
tmp = t_0;
} else if (F <= 1.92e-193) {
tmp = t_1 + ((F / B) * (1.0 / F));
} else if (F <= 3.1e-66) {
tmp = t_0;
} else if ((F <= 6.8e+57) || (!(F <= 5.1e+177) && (F <= 2.2e+220))) {
tmp = t_1 + (1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.0045: tmp = t_1 + (-1.0 / B) elif F <= -3.3e-224: tmp = t_0 elif F <= 1.92e-193: tmp = t_1 + ((F / B) * (1.0 / F)) elif F <= 3.1e-66: tmp = t_0 elif (F <= 6.8e+57) or (not (F <= 5.1e+177) and (F <= 2.2e+220)): tmp = t_1 + (1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.0045) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -3.3e-224) tmp = t_0; elseif (F <= 1.92e-193) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 3.1e-66) tmp = t_0; elseif ((F <= 6.8e+57) || (!(F <= 5.1e+177) && (F <= 2.2e+220))) tmp = Float64(t_1 + Float64(1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.0045) tmp = t_1 + (-1.0 / B); elseif (F <= -3.3e-224) tmp = t_0; elseif (F <= 1.92e-193) tmp = t_1 + ((F / B) * (1.0 / F)); elseif (F <= 3.1e-66) tmp = t_0; elseif ((F <= 6.8e+57) || (~((F <= 5.1e+177)) && (F <= 2.2e+220))) tmp = t_1 + (1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0045], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.3e-224], t$95$0, If[LessEqual[F, 1.92e-193], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-66], t$95$0, If[Or[LessEqual[F, 6.8e+57], And[N[Not[LessEqual[F, 5.1e+177]], $MachinePrecision], LessEqual[F, 2.2e+220]]], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.0045:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -3.3 \cdot 10^{-224}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.92 \cdot 10^{-193}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-66}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+57} \lor \neg \left(F \leq 5.1 \cdot 10^{+177}\right) \land F \leq 2.2 \cdot 10^{+220}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.00449999999999999966Initial program 58.4%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 74.7%
if -0.00449999999999999966 < F < -3.3000000000000001e-224 or 1.92e-193 < F < 3.0999999999999997e-66Initial program 99.3%
Taylor expanded in B around 0 76.0%
Taylor expanded in B around 0 59.1%
Taylor expanded in F around 0 59.1%
if -3.3000000000000001e-224 < F < 1.92e-193Initial program 99.6%
Taylor expanded in B around 0 93.5%
Taylor expanded in F around inf 71.5%
if 3.0999999999999997e-66 < F < 6.79999999999999984e57 or 5.1000000000000004e177 < F < 2.19999999999999989e220Initial program 84.2%
Taylor expanded in B around 0 74.2%
Taylor expanded in F around inf 83.5%
if 6.79999999999999984e57 < F < 5.1000000000000004e177 or 2.19999999999999989e220 < F Initial program 43.4%
Taylor expanded in B around inf 43.4%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 90.7%
Final simplification75.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -280000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.35e-278)
(+ t_0 (* (/ F B) (/ -1.0 F)))
(if (or (<= F 3.1e-37) (and (not (<= F 5.6e+177)) (<= F 7.2e+219)))
(+ t_0 (/ 1.0 B))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -280000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.35e-278) {
tmp = t_0 + ((F / B) * (-1.0 / F));
} else if ((F <= 3.1e-37) || (!(F <= 5.6e+177) && (F <= 7.2e+219))) {
tmp = t_0 + (1.0 / B);
} else {
tmp = (1.0 / sin(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) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-280000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.35d-278) then
tmp = t_0 + ((f / b) * ((-1.0d0) / f))
else if ((f <= 3.1d-37) .or. (.not. (f <= 5.6d+177)) .and. (f <= 7.2d+219)) then
tmp = t_0 + (1.0d0 / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -280000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.35e-278) {
tmp = t_0 + ((F / B) * (-1.0 / F));
} else if ((F <= 3.1e-37) || (!(F <= 5.6e+177) && (F <= 7.2e+219))) {
tmp = t_0 + (1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -280000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.35e-278: tmp = t_0 + ((F / B) * (-1.0 / F)) elif (F <= 3.1e-37) or (not (F <= 5.6e+177) and (F <= 7.2e+219)): tmp = t_0 + (1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -280000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.35e-278) tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif ((F <= 3.1e-37) || (!(F <= 5.6e+177) && (F <= 7.2e+219))) tmp = Float64(t_0 + Float64(1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -280000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.35e-278) tmp = t_0 + ((F / B) * (-1.0 / F)); elseif ((F <= 3.1e-37) || (~((F <= 5.6e+177)) && (F <= 7.2e+219))) tmp = t_0 + (1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -280000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e-278], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.1e-37], And[N[Not[LessEqual[F, 5.6e+177]], $MachinePrecision], LessEqual[F, 7.2e+219]]], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -280000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-278}:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-37} \lor \neg \left(F \leq 5.6 \cdot 10^{+177}\right) \land F \leq 7.2 \cdot 10^{+219}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.8e11Initial program 57.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 74.8%
if -2.8e11 < F < 2.3499999999999998e-278Initial program 99.4%
Taylor expanded in B around 0 88.8%
Taylor expanded in F around -inf 57.0%
if 2.3499999999999998e-278 < F < 3.09999999999999993e-37 or 5.60000000000000004e177 < F < 7.20000000000000012e219Initial program 87.6%
Taylor expanded in B around 0 64.5%
Taylor expanded in F around inf 55.3%
if 3.09999999999999993e-37 < F < 5.60000000000000004e177 or 7.20000000000000012e219 < F Initial program 59.5%
Taylor expanded in B around inf 59.5%
Taylor expanded in F around inf 96.0%
Taylor expanded in B around 0 88.4%
Final simplification70.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -2.1e-199)
(+ t_0 (/ -1.0 B))
(if (<= F 2.2e+45)
(+ t_0 (* (/ F B) (/ 1.0 F)))
(if (or (<= F 2.25e+182) (not (<= F 7e+219)))
(- (/ 1.0 (sin B)) (/ x B))
(+ t_0 (/ 1.0 B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.1e-199) {
tmp = t_0 + (-1.0 / B);
} else if (F <= 2.2e+45) {
tmp = t_0 + ((F / B) * (1.0 / F));
} else if ((F <= 2.25e+182) || !(F <= 7e+219)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = t_0 + (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) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-2.1d-199)) then
tmp = t_0 + ((-1.0d0) / b)
else if (f <= 2.2d+45) then
tmp = t_0 + ((f / b) * (1.0d0 / f))
else if ((f <= 2.25d+182) .or. (.not. (f <= 7d+219))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = t_0 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.1e-199) {
tmp = t_0 + (-1.0 / B);
} else if (F <= 2.2e+45) {
tmp = t_0 + ((F / B) * (1.0 / F));
} else if ((F <= 2.25e+182) || !(F <= 7e+219)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.1e-199: tmp = t_0 + (-1.0 / B) elif F <= 2.2e+45: tmp = t_0 + ((F / B) * (1.0 / F)) elif (F <= 2.25e+182) or not (F <= 7e+219): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.1e-199) tmp = Float64(t_0 + Float64(-1.0 / B)); elseif (F <= 2.2e+45) tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(1.0 / F))); elseif ((F <= 2.25e+182) || !(F <= 7e+219)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.1e-199) tmp = t_0 + (-1.0 / B); elseif (F <= 2.2e+45) tmp = t_0 + ((F / B) * (1.0 / F)); elseif ((F <= 2.25e+182) || ~((F <= 7e+219))) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_0 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.1e-199], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e+45], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 2.25e+182], N[Not[LessEqual[F, 7e+219]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{-199}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+45}:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{+182} \lor \neg \left(F \leq 7 \cdot 10^{+219}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.10000000000000002e-199Initial program 71.7%
Taylor expanded in F around -inf 80.8%
Taylor expanded in B around 0 65.7%
if -2.10000000000000002e-199 < F < 2.2e45Initial program 99.5%
Taylor expanded in B around 0 81.8%
Taylor expanded in F around inf 60.5%
if 2.2e45 < F < 2.25000000000000015e182 or 7.0000000000000002e219 < F Initial program 43.4%
Taylor expanded in B around inf 43.4%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 90.7%
if 2.25000000000000015e182 < F < 7.0000000000000002e219Initial program 54.7%
Taylor expanded in B around 0 54.7%
Taylor expanded in F around inf 92.3%
Final simplification70.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F 2.7e-38)
(+ t_0 (/ -1.0 B))
(if (or (<= F 9.5e+179) (not (<= F 1.35e+220)))
(- (/ 1.0 (sin B)) (/ x B))
(+ t_0 (/ 1.0 B))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= 2.7e-38) {
tmp = t_0 + (-1.0 / B);
} else if ((F <= 9.5e+179) || !(F <= 1.35e+220)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = t_0 + (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) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= 2.7d-38) then
tmp = t_0 + ((-1.0d0) / b)
else if ((f <= 9.5d+179) .or. (.not. (f <= 1.35d+220))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = t_0 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= 2.7e-38) {
tmp = t_0 + (-1.0 / B);
} else if ((F <= 9.5e+179) || !(F <= 1.35e+220)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= 2.7e-38: tmp = t_0 + (-1.0 / B) elif (F <= 9.5e+179) or not (F <= 1.35e+220): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= 2.7e-38) tmp = Float64(t_0 + Float64(-1.0 / B)); elseif ((F <= 9.5e+179) || !(F <= 1.35e+220)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= 2.7e-38) tmp = t_0 + (-1.0 / B); elseif ((F <= 9.5e+179) || ~((F <= 1.35e+220))) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_0 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 2.7e-38], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 9.5e+179], N[Not[LessEqual[F, 1.35e+220]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq 2.7 \cdot 10^{-38}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+179} \lor \neg \left(F \leq 1.35 \cdot 10^{+220}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < 2.70000000000000005e-38Initial program 82.4%
Taylor expanded in F around -inf 64.0%
Taylor expanded in B around 0 58.9%
if 2.70000000000000005e-38 < F < 9.5e179 or 1.3499999999999999e220 < F Initial program 60.1%
Taylor expanded in B around inf 60.0%
Taylor expanded in F around inf 94.8%
Taylor expanded in B around 0 87.3%
if 9.5e179 < F < 1.3499999999999999e220Initial program 54.7%
Taylor expanded in B around 0 54.7%
Taylor expanded in F around inf 92.3%
Final simplification68.8%
(FPCore (F B x) :precision binary64 (if (<= F -3.4e-99) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 5.2e-60) (/ (- x) B) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-99) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.2e-60) {
tmp = -x / B;
} else {
tmp = (1.0 / sin(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 <= (-3.4d-99)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.2d-60) then
tmp = -x / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-99) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.2e-60) {
tmp = -x / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.4e-99: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.2e-60: tmp = -x / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.4e-99) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.2e-60) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.4e-99) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.2e-60) tmp = -x / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.4e-99], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e-60], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.4 \cdot 10^{-99}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.40000000000000007e-99Initial program 64.8%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 70.1%
if -3.40000000000000007e-99 < F < 5.1999999999999995e-60Initial program 99.4%
Taylor expanded in F around -inf 35.9%
Taylor expanded in B around 0 19.1%
associate-*r/19.1%
distribute-lft-in19.1%
metadata-eval19.1%
neg-mul-119.1%
Simplified19.1%
Taylor expanded in x around inf 38.8%
associate-*r/38.8%
mul-1-neg38.8%
Simplified38.8%
if 5.1999999999999995e-60 < F Initial program 60.6%
Taylor expanded in B around inf 60.5%
Taylor expanded in F around inf 94.6%
Taylor expanded in B around 0 78.0%
Final simplification62.7%
(FPCore (F B x) :precision binary64 (if (<= F 2.7e-38) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)) (- (/ 1.0 (sin B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= 2.7e-38) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else {
tmp = (1.0 / sin(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.7d-38) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 2.7e-38) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 2.7e-38: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 2.7e-38) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 2.7e-38) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 2.7e-38], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.7 \cdot 10^{-38}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < 2.70000000000000005e-38Initial program 82.4%
Taylor expanded in F around -inf 64.0%
Taylor expanded in B around 0 58.9%
if 2.70000000000000005e-38 < F Initial program 59.3%
Taylor expanded in B around inf 59.2%
Taylor expanded in F around inf 95.5%
Taylor expanded in B around 0 80.5%
Final simplification66.2%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-100) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 3.2e-48) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-100) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.2e-48) {
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 <= (-3.8d-100)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.2d-48) 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 <= -3.8e-100) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.2e-48) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-100: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.2e-48: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-100) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.2e-48) 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 <= -3.8e-100) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.2e-48) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-100], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-48], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-100}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.79999999999999997e-100Initial program 64.8%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 70.1%
if -3.79999999999999997e-100 < F < 3.1999999999999998e-48Initial program 99.4%
Taylor expanded in F around -inf 36.2%
Taylor expanded in B around 0 18.8%
associate-*r/18.8%
distribute-lft-in18.8%
metadata-eval18.8%
neg-mul-118.8%
Simplified18.8%
Taylor expanded in x around inf 38.0%
associate-*r/38.0%
mul-1-neg38.0%
Simplified38.0%
if 3.1999999999999998e-48 < F Initial program 59.7%
Taylor expanded in B around 0 46.8%
Taylor expanded in B around 0 31.4%
Taylor expanded in F around inf 55.8%
div-sub55.8%
Simplified55.8%
Final simplification54.5%
(FPCore (F B x) :precision binary64 (if (<= F -2.8e+18) (/ -1.0 B) (if (<= F 2.8e-55) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e+18) {
tmp = -1.0 / B;
} else if (F <= 2.8e-55) {
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.8d+18)) then
tmp = (-1.0d0) / b
else if (f <= 2.8d-55) 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.8e+18) {
tmp = -1.0 / B;
} else if (F <= 2.8e-55) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.8e+18: tmp = -1.0 / B elif F <= 2.8e-55: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.8e+18) tmp = Float64(-1.0 / B); elseif (F <= 2.8e-55) 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.8e+18) tmp = -1.0 / B; elseif (F <= 2.8e-55) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.8e+18], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.8e-55], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.8 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.8e18Initial program 56.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 52.6%
associate-*r/52.6%
distribute-lft-in52.6%
metadata-eval52.6%
neg-mul-152.6%
Simplified52.6%
Taylor expanded in x around 0 34.7%
if -2.8e18 < F < 2.79999999999999984e-55Initial program 99.4%
Taylor expanded in F around -inf 39.9%
Taylor expanded in B around 0 23.3%
associate-*r/23.3%
distribute-lft-in23.3%
metadata-eval23.3%
neg-mul-123.3%
Simplified23.3%
Taylor expanded in x around inf 39.2%
associate-*r/39.2%
mul-1-neg39.2%
Simplified39.2%
if 2.79999999999999984e-55 < F Initial program 59.7%
Taylor expanded in B around 0 46.8%
Taylor expanded in B around 0 31.4%
Taylor expanded in F around inf 55.8%
div-sub55.8%
Simplified55.8%
Final simplification43.7%
(FPCore (F B x) :precision binary64 (if (<= F -3e-99) (/ (- -1.0 x) B) (if (<= F 5.6e-45) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-99) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.6e-45) {
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 <= (-3d-99)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5.6d-45) 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 <= -3e-99) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.6e-45) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e-99: tmp = (-1.0 - x) / B elif F <= 5.6e-45: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e-99) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5.6e-45) 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 <= -3e-99) tmp = (-1.0 - x) / B; elseif (F <= 5.6e-45) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e-99], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.6e-45], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-99}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-45}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.00000000000000006e-99Initial program 64.8%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 51.5%
associate-*r/51.5%
distribute-lft-in51.5%
metadata-eval51.5%
neg-mul-151.5%
Simplified51.5%
if -3.00000000000000006e-99 < F < 5.6000000000000003e-45Initial program 99.4%
Taylor expanded in F around -inf 36.2%
Taylor expanded in B around 0 18.8%
associate-*r/18.8%
distribute-lft-in18.8%
metadata-eval18.8%
neg-mul-118.8%
Simplified18.8%
Taylor expanded in x around inf 38.0%
associate-*r/38.0%
mul-1-neg38.0%
Simplified38.0%
if 5.6000000000000003e-45 < F Initial program 59.7%
Taylor expanded in B around 0 46.8%
Taylor expanded in B around 0 31.4%
Taylor expanded in F around inf 55.8%
div-sub55.8%
Simplified55.8%
Final simplification48.5%
(FPCore (F B x) :precision binary64 (if (<= F -2e-99) (- (/ -1.0 B) (/ x B)) (if (<= F 7.8e-47) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-99) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 7.8e-47) {
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 <= (-2d-99)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 7.8d-47) 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 <= -2e-99) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 7.8e-47) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-99: tmp = (-1.0 / B) - (x / B) elif F <= 7.8e-47: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-99) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 7.8e-47) 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 <= -2e-99) tmp = (-1.0 / B) - (x / B); elseif (F <= 7.8e-47) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-99], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-47], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-99}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2e-99Initial program 64.8%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 51.5%
associate-*r/51.5%
distribute-lft-in51.5%
metadata-eval51.5%
neg-mul-151.5%
Simplified51.5%
Taylor expanded in x around 0 51.6%
sub-neg51.6%
mul-1-neg51.6%
+-commutative51.6%
distribute-neg-frac51.6%
metadata-eval51.6%
sub-neg51.6%
Simplified51.6%
if -2e-99 < F < 7.79999999999999956e-47Initial program 99.4%
Taylor expanded in F around -inf 36.2%
Taylor expanded in B around 0 18.8%
associate-*r/18.8%
distribute-lft-in18.8%
metadata-eval18.8%
neg-mul-118.8%
Simplified18.8%
Taylor expanded in x around inf 38.0%
associate-*r/38.0%
mul-1-neg38.0%
Simplified38.0%
if 7.79999999999999956e-47 < F Initial program 59.7%
Taylor expanded in B around 0 46.8%
Taylor expanded in B around 0 31.4%
Taylor expanded in F around inf 55.8%
div-sub55.8%
Simplified55.8%
Final simplification48.5%
(FPCore (F B x) :precision binary64 (if (<= F -4.1e+17) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e+17) {
tmp = -1.0 / B;
} else {
tmp = -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 <= (-4.1d+17)) then
tmp = (-1.0d0) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e+17) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.1e+17: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.1e+17) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.1e+17) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.1e+17], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.1 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -4.1e17Initial program 56.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 52.6%
associate-*r/52.6%
distribute-lft-in52.6%
metadata-eval52.6%
neg-mul-152.6%
Simplified52.6%
Taylor expanded in x around 0 34.7%
if -4.1e17 < F Initial program 80.9%
Taylor expanded in F around -inf 41.7%
Taylor expanded in B around 0 26.0%
associate-*r/26.0%
distribute-lft-in26.0%
metadata-eval26.0%
neg-mul-126.0%
Simplified26.0%
Taylor expanded in x around inf 34.9%
associate-*r/34.9%
mul-1-neg34.9%
Simplified34.9%
Final simplification34.9%
(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 74.6%
Taylor expanded in F around -inf 56.9%
Taylor expanded in B around 0 33.0%
associate-*r/33.0%
distribute-lft-in33.0%
metadata-eval33.0%
neg-mul-133.0%
Simplified33.0%
Taylor expanded in x around 0 12.0%
Final simplification12.0%
herbie shell --seed 2023334
(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))))))