
(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 26 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 -2.85e+78)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 300000000.0)
(- (* (/ F (sin B)) (pow (fma F F (fma 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 <= -2.85e+78) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 300000000.0) {
tmp = ((F / sin(B)) * pow(fma(F, F, fma(2.0, x, 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.85e+78) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 300000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (fma(F, F, fma(2.0, x, 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.85e+78], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 300000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(F * F + N[(2.0 * 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 -2.85 \cdot 10^{+78}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 300000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.84999999999999993e78Initial program 43.6%
distribute-lft-neg-in43.6%
+-commutative43.6%
cancel-sign-sub-inv43.6%
Simplified63.3%
clear-num63.3%
inv-pow63.3%
fma-def63.3%
fma-udef63.3%
*-commutative63.3%
fma-def63.3%
fma-def63.3%
Applied egg-rr63.3%
unpow-163.3%
fma-udef63.3%
fma-udef63.3%
unpow263.3%
+-commutative63.3%
associate-+r+63.3%
+-commutative63.3%
+-commutative63.3%
unpow263.3%
fma-def63.3%
+-commutative63.3%
fma-def63.3%
Simplified63.3%
Taylor expanded in F around -inf 99.9%
if -2.84999999999999993e78 < F < 3e8Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
fma-udef99.6%
associate-*l/99.5%
associate-*r/99.6%
distribute-frac-neg99.6%
unsub-neg99.6%
associate-*r/99.5%
associate-*l/99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
if 3e8 < F Initial program 54.0%
distribute-lft-neg-in54.0%
+-commutative54.0%
cancel-sign-sub-inv54.0%
Simplified68.1%
clear-num68.1%
inv-pow68.1%
fma-def68.1%
fma-udef68.1%
*-commutative68.1%
fma-def68.1%
fma-def68.1%
Applied egg-rr68.1%
unpow-168.1%
fma-udef68.1%
fma-udef68.1%
unpow268.1%
+-commutative68.1%
associate-+r+68.1%
+-commutative68.1%
+-commutative68.1%
unpow268.1%
fma-def68.1%
+-commutative68.1%
fma-def68.1%
Simplified68.1%
Taylor expanded in F around inf 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e+78)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 60000000.0)
(- (* (/ F (sin B)) (pow (+ (* x 2.0) (+ 2.0 (* F F))) -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 <= -3e+78) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 60000000.0) {
tmp = ((F / sin(B)) * pow(((x * 2.0) + (2.0 + (F * F))), -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 <= (-3d+78)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 60000000.0d0) then
tmp = ((f / sin(b)) * (((x * 2.0d0) + (2.0d0 + (f * f))) ** (-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 <= -3e+78) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 60000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((x * 2.0) + (2.0 + (F * F))), -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 <= -3e+78: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 60000000.0: tmp = ((F / math.sin(B)) * math.pow(((x * 2.0) + (2.0 + (F * F))), -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 <= -3e+78) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 60000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ -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 <= -3e+78) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 60000000.0) tmp = ((F / sin(B)) * (((x * 2.0) + (2.0 + (F * F))) ^ -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, -3e+78], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 60000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $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 -3 \cdot 10^{+78}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 60000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.99999999999999982e78Initial program 43.6%
distribute-lft-neg-in43.6%
+-commutative43.6%
cancel-sign-sub-inv43.6%
Simplified63.3%
clear-num63.3%
inv-pow63.3%
fma-def63.3%
fma-udef63.3%
*-commutative63.3%
fma-def63.3%
fma-def63.3%
Applied egg-rr63.3%
unpow-163.3%
fma-udef63.3%
fma-udef63.3%
unpow263.3%
+-commutative63.3%
associate-+r+63.3%
+-commutative63.3%
+-commutative63.3%
unpow263.3%
fma-def63.3%
+-commutative63.3%
fma-def63.3%
Simplified63.3%
Taylor expanded in F around -inf 99.9%
if -2.99999999999999982e78 < F < 6e7Initial program 99.5%
div-inv99.6%
expm1-log1p-u80.2%
expm1-udef58.4%
Applied egg-rr58.4%
expm1-def80.2%
expm1-log1p99.6%
Simplified99.6%
if 6e7 < F Initial program 54.0%
distribute-lft-neg-in54.0%
+-commutative54.0%
cancel-sign-sub-inv54.0%
Simplified68.1%
clear-num68.1%
inv-pow68.1%
fma-def68.1%
fma-udef68.1%
*-commutative68.1%
fma-def68.1%
fma-def68.1%
Applied egg-rr68.1%
unpow-168.1%
fma-udef68.1%
fma-udef68.1%
unpow268.1%
+-commutative68.1%
associate-+r+68.1%
+-commutative68.1%
+-commutative68.1%
unpow268.1%
fma-def68.1%
+-commutative68.1%
fma-def68.1%
Simplified68.1%
Taylor expanded in F around inf 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -5.3e+25)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 0.044)
(- (* F (/ 1.0 (* (sin B) (sqrt t_0)))) t_1)
(- (* F (/ 1.0 (* (sin B) (+ F (* 0.5 (/ t_0 F)))))) t_1)))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -5.3e+25) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 0.044) {
tmp = (F * (1.0 / (sin(B) * sqrt(t_0)))) - t_1;
} else {
tmp = (F * (1.0 / (sin(B) * (F + (0.5 * (t_0 / F)))))) - 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 = 2.0d0 + (x * 2.0d0)
t_1 = x / tan(b)
if (f <= (-5.3d+25)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 0.044d0) then
tmp = (f * (1.0d0 / (sin(b) * sqrt(t_0)))) - t_1
else
tmp = (f * (1.0d0 / (sin(b) * (f + (0.5d0 * (t_0 / f)))))) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -5.3e+25) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 0.044) {
tmp = (F * (1.0 / (Math.sin(B) * Math.sqrt(t_0)))) - t_1;
} else {
tmp = (F * (1.0 / (Math.sin(B) * (F + (0.5 * (t_0 / F)))))) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -5.3e+25: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 0.044: tmp = (F * (1.0 / (math.sin(B) * math.sqrt(t_0)))) - t_1 else: tmp = (F * (1.0 / (math.sin(B) * (F + (0.5 * (t_0 / F)))))) - t_1 return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.3e+25) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 0.044) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * sqrt(t_0)))) - t_1); else tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * Float64(F + Float64(0.5 * Float64(t_0 / F)))))) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -5.3e+25) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 0.044) tmp = (F * (1.0 / (sin(B) * sqrt(t_0)))) - t_1; else tmp = (F * (1.0 / (sin(B) * (F + (0.5 * (t_0 / F)))))) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.3e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 0.044], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.3 \cdot 10^{+25}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 0.044:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{t_0}} - t_1\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \left(F + 0.5 \cdot \frac{t_0}{F}\right)} - t_1\\
\end{array}
\end{array}
if F < -5.29999999999999986e25Initial program 51.6%
distribute-lft-neg-in51.6%
+-commutative51.6%
cancel-sign-sub-inv51.6%
Simplified68.5%
clear-num68.5%
inv-pow68.5%
fma-def68.5%
fma-udef68.5%
*-commutative68.5%
fma-def68.5%
fma-def68.5%
Applied egg-rr68.5%
unpow-168.5%
fma-udef68.5%
fma-udef68.5%
unpow268.5%
+-commutative68.5%
associate-+r+68.5%
+-commutative68.5%
+-commutative68.5%
unpow268.5%
fma-def68.5%
+-commutative68.5%
fma-def68.5%
Simplified68.5%
Taylor expanded in F around -inf 99.9%
if -5.29999999999999986e25 < F < 0.043999999999999997Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.5%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in F around 0 97.8%
if 0.043999999999999997 < F Initial program 55.6%
distribute-lft-neg-in55.6%
+-commutative55.6%
cancel-sign-sub-inv55.6%
Simplified69.2%
clear-num69.3%
inv-pow69.3%
fma-def69.3%
fma-udef69.3%
*-commutative69.3%
fma-def69.3%
fma-def69.3%
Applied egg-rr69.3%
unpow-169.3%
fma-udef69.3%
fma-udef69.3%
unpow269.3%
+-commutative69.3%
associate-+r+69.3%
+-commutative69.3%
+-commutative69.3%
unpow269.3%
fma-def69.3%
+-commutative69.3%
fma-def69.3%
Simplified69.3%
Taylor expanded in B around inf 69.2%
Taylor expanded in F around inf 99.2%
Final simplification98.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.8e+93)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 22000000.0)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* F F))))) 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 <= -2.8e+93) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 22000000.0) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (F * F))))) - 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 <= (-2.8d+93)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 22000000.0d0) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (f * f))))) - 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 <= -2.8e+93) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 22000000.0) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (F * F))))) - 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 <= -2.8e+93: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 22000000.0: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (F * F))))) - 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 <= -2.8e+93) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 22000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(F * F))))) - 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 <= -2.8e+93) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 22000000.0) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (F * F))))) - 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, -2.8e+93], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 22000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $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 -2.8 \cdot 10^{+93}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 22000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + F \cdot F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.79999999999999989e93Initial program 38.6%
distribute-lft-neg-in38.6%
+-commutative38.6%
cancel-sign-sub-inv38.6%
Simplified60.0%
clear-num60.0%
inv-pow60.0%
fma-def60.0%
fma-udef60.0%
*-commutative60.0%
fma-def60.0%
fma-def60.0%
Applied egg-rr60.0%
unpow-160.0%
fma-udef60.0%
fma-udef60.0%
unpow260.0%
+-commutative60.0%
associate-+r+60.0%
+-commutative60.0%
+-commutative60.0%
unpow260.0%
fma-def60.0%
+-commutative60.0%
fma-def60.0%
Simplified60.0%
Taylor expanded in F around -inf 99.9%
if -2.79999999999999989e93 < F < 2.2e7Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in x around 0 99.2%
*-commutative99.2%
+-commutative99.2%
unpow299.2%
Simplified99.2%
if 2.2e7 < F Initial program 54.0%
distribute-lft-neg-in54.0%
+-commutative54.0%
cancel-sign-sub-inv54.0%
Simplified68.1%
clear-num68.1%
inv-pow68.1%
fma-def68.1%
fma-udef68.1%
*-commutative68.1%
fma-def68.1%
fma-def68.1%
Applied egg-rr68.1%
unpow-168.1%
fma-udef68.1%
fma-udef68.1%
unpow268.1%
+-commutative68.1%
associate-+r+68.1%
+-commutative68.1%
+-commutative68.1%
unpow268.1%
fma-def68.1%
+-commutative68.1%
fma-def68.1%
Simplified68.1%
Taylor expanded in F around inf 99.8%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -1.65e+24)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.7e-160)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x B))
(if (or (<= F 7.5e-100) (not (<= F 3.3e-7)))
(- (* F (/ 1.0 (* (sin B) (+ F (* 0.5 (/ t_0 F)))))) t_1)
(- (* (/ F (sin B)) (sqrt (/ 1.0 t_0))) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.7e-160) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / B);
} else if ((F <= 7.5e-100) || !(F <= 3.3e-7)) {
tmp = (F * (1.0 / (sin(B) * (F + (0.5 * (t_0 / F)))))) - t_1;
} else {
tmp = ((F / sin(B)) * sqrt((1.0 / t_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 = 2.0d0 + (x * 2.0d0)
t_1 = x / tan(b)
if (f <= (-1.65d+24)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.7d-160)) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
else if ((f <= 7.5d-100) .or. (.not. (f <= 3.3d-7))) then
tmp = (f * (1.0d0 / (sin(b) * (f + (0.5d0 * (t_0 / f)))))) - t_1
else
tmp = ((f / sin(b)) * sqrt((1.0d0 / t_0))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.7e-160) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
} else if ((F <= 7.5e-100) || !(F <= 3.3e-7)) {
tmp = (F * (1.0 / (Math.sin(B) * (F + (0.5 * (t_0 / F)))))) - t_1;
} else {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / t_0))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -1.65e+24: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.7e-160: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) elif (F <= 7.5e-100) or not (F <= 3.3e-7): tmp = (F * (1.0 / (math.sin(B) * (F + (0.5 * (t_0 / F)))))) - t_1 else: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / t_0))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65e+24) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.7e-160) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)); elseif ((F <= 7.5e-100) || !(F <= 3.3e-7)) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * Float64(F + Float64(0.5 * Float64(t_0 / F)))))) - t_1); else tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / t_0))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.65e+24) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.7e-160) tmp = (F * (sqrt(0.5) / sin(B))) - (x / B); elseif ((F <= 7.5e-100) || ~((F <= 3.3e-7))) tmp = (F * (1.0 / (sin(B) * (F + (0.5 * (t_0 / F)))))) - t_1; else tmp = ((F / sin(B)) * sqrt((1.0 / t_0))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.65e+24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.7e-160], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 7.5e-100], N[Not[LessEqual[F, 3.3e-7]], $MachinePrecision]], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.7 \cdot 10^{-160}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-100} \lor \neg \left(F \leq 3.3 \cdot 10^{-7}\right):\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \left(F + 0.5 \cdot \frac{t_0}{F}\right)} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{t_0}} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.6499999999999999e24Initial program 52.3%
distribute-lft-neg-in52.3%
+-commutative52.3%
cancel-sign-sub-inv52.3%
Simplified69.0%
clear-num68.9%
inv-pow68.9%
fma-def68.9%
fma-udef68.9%
*-commutative68.9%
fma-def68.9%
fma-def68.9%
Applied egg-rr68.9%
unpow-168.9%
fma-udef68.9%
fma-udef68.9%
unpow268.9%
+-commutative68.9%
associate-+r+68.9%
+-commutative68.9%
+-commutative68.9%
unpow268.9%
fma-def68.9%
+-commutative68.9%
fma-def68.9%
Simplified68.9%
Taylor expanded in F around -inf 99.9%
if -1.6499999999999999e24 < F < -4.6999999999999998e-160Initial program 99.3%
Taylor expanded in B around 0 83.9%
Taylor expanded in F around 0 82.2%
Taylor expanded in x around 0 82.2%
associate-/l*82.4%
associate-/r/82.4%
Simplified82.4%
if -4.6999999999999998e-160 < F < 7.50000000000000015e-100 or 3.3000000000000002e-7 < F Initial program 75.2%
distribute-lft-neg-in75.2%
+-commutative75.2%
cancel-sign-sub-inv75.2%
Simplified82.8%
clear-num82.8%
inv-pow82.8%
fma-def82.8%
fma-udef82.8%
*-commutative82.8%
fma-def82.8%
fma-def82.8%
Applied egg-rr82.8%
unpow-182.8%
fma-udef82.8%
fma-udef82.8%
unpow282.8%
+-commutative82.8%
associate-+r+82.8%
+-commutative82.8%
+-commutative82.8%
unpow282.8%
fma-def82.8%
+-commutative82.8%
fma-def82.8%
Simplified82.8%
Taylor expanded in B around inf 82.8%
Taylor expanded in F around inf 90.7%
if 7.50000000000000015e-100 < F < 3.3000000000000002e-7Initial program 99.4%
Taylor expanded in B around 0 87.0%
Taylor expanded in F around 0 87.0%
Final simplification92.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.65e+24)
(- (/ -1.0 (sin B)) t_0)
(if (or (<= F -8e-155) (and (not (<= F 1.15e-98)) (<= F 0.044)))
(- (* (/ F (sin B)) (pow (+ (* x 2.0) (+ 2.0 (* F F))) -0.5)) (/ x B))
(-
(* F (/ 1.0 (* (sin B) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / sin(B)) - t_0;
} else if ((F <= -8e-155) || (!(F <= 1.15e-98) && (F <= 0.044))) {
tmp = ((F / sin(B)) * pow(((x * 2.0) + (2.0 + (F * F))), -0.5)) - (x / B);
} else {
tmp = (F * (1.0 / (sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - 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.65d+24)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if ((f <= (-8d-155)) .or. (.not. (f <= 1.15d-98)) .and. (f <= 0.044d0)) then
tmp = ((f / sin(b)) * (((x * 2.0d0) + (2.0d0 + (f * f))) ** (-0.5d0))) - (x / b)
else
tmp = (f * (1.0d0 / (sin(b) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))) - 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.65e+24) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if ((F <= -8e-155) || (!(F <= 1.15e-98) && (F <= 0.044))) {
tmp = ((F / Math.sin(B)) * Math.pow(((x * 2.0) + (2.0 + (F * F))), -0.5)) - (x / B);
} else {
tmp = (F * (1.0 / (Math.sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.65e+24: tmp = (-1.0 / math.sin(B)) - t_0 elif (F <= -8e-155) or (not (F <= 1.15e-98) and (F <= 0.044)): tmp = ((F / math.sin(B)) * math.pow(((x * 2.0) + (2.0 + (F * F))), -0.5)) - (x / B) else: tmp = (F * (1.0 / (math.sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65e+24) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif ((F <= -8e-155) || (!(F <= 1.15e-98) && (F <= 0.044))) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ -0.5)) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.65e+24) tmp = (-1.0 / sin(B)) - t_0; elseif ((F <= -8e-155) || (~((F <= 1.15e-98)) && (F <= 0.044))) tmp = ((F / sin(B)) * (((x * 2.0) + (2.0 + (F * F))) ^ -0.5)) - (x / B); else tmp = (F * (1.0 / (sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - 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.65e+24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[Or[LessEqual[F, -8e-155], And[N[Not[LessEqual[F, 1.15e-98]], $MachinePrecision], LessEqual[F, 0.044]]], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -8 \cdot 10^{-155} \lor \neg \left(F \leq 1.15 \cdot 10^{-98}\right) \land F \leq 0.044:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)} - t_0\\
\end{array}
\end{array}
if F < -1.6499999999999999e24Initial program 52.3%
distribute-lft-neg-in52.3%
+-commutative52.3%
cancel-sign-sub-inv52.3%
Simplified69.0%
clear-num68.9%
inv-pow68.9%
fma-def68.9%
fma-udef68.9%
*-commutative68.9%
fma-def68.9%
fma-def68.9%
Applied egg-rr68.9%
unpow-168.9%
fma-udef68.9%
fma-udef68.9%
unpow268.9%
+-commutative68.9%
associate-+r+68.9%
+-commutative68.9%
+-commutative68.9%
unpow268.9%
fma-def68.9%
+-commutative68.9%
fma-def68.9%
Simplified68.9%
Taylor expanded in F around -inf 99.9%
if -1.6499999999999999e24 < F < -8.00000000000000011e-155 or 1.15e-98 < F < 0.043999999999999997Initial program 99.4%
Taylor expanded in B around 0 82.3%
if -8.00000000000000011e-155 < F < 1.15e-98 or 0.043999999999999997 < F Initial program 74.4%
distribute-lft-neg-in74.4%
+-commutative74.4%
cancel-sign-sub-inv74.4%
Simplified82.2%
clear-num82.2%
inv-pow82.2%
fma-def82.2%
fma-udef82.2%
*-commutative82.2%
fma-def82.2%
fma-def82.2%
Applied egg-rr82.2%
unpow-182.2%
fma-udef82.2%
fma-udef82.2%
unpow282.2%
+-commutative82.2%
associate-+r+82.2%
+-commutative82.2%
+-commutative82.2%
unpow282.2%
fma-def82.2%
+-commutative82.2%
fma-def82.2%
Simplified82.2%
Taylor expanded in B around inf 82.2%
Taylor expanded in F around inf 92.2%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (* x 2.0) (+ 2.0 (* F F))) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -1.65e+24)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -5.6e-53)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 0.00017)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(-
(* F (/ 1.0 (* (sin B) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
t_1))))))
double code(double F, double B, double x) {
double t_0 = pow(((x * 2.0) + (2.0 + (F * F))), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -5.6e-53) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 0.00017) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else {
tmp = (F * (1.0 / (sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - 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 = ((x * 2.0d0) + (2.0d0 + (f * f))) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-1.65d+24)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-5.6d-53)) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 0.00017d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else
tmp = (f * (1.0d0 / (sin(b) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((x * 2.0) + (2.0 + (F * F))), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -5.6e-53) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 0.00017) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else {
tmp = (F * (1.0 / (Math.sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((x * 2.0) + (2.0 + (F * F))), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -1.65e+24: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -5.6e-53: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 0.00017: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) else: tmp = (F * (1.0 / (math.sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65e+24) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -5.6e-53) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 0.00017) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((x * 2.0) + (2.0 + (F * F))) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -1.65e+24) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -5.6e-53) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 0.00017) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); else tmp = (F * (1.0 / (sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.65e+24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.6e-53], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00017], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -5.6 \cdot 10^{-53}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.00017:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)} - t_1\\
\end{array}
\end{array}
if F < -1.6499999999999999e24Initial program 52.3%
distribute-lft-neg-in52.3%
+-commutative52.3%
cancel-sign-sub-inv52.3%
Simplified69.0%
clear-num68.9%
inv-pow68.9%
fma-def68.9%
fma-udef68.9%
*-commutative68.9%
fma-def68.9%
fma-def68.9%
Applied egg-rr68.9%
unpow-168.9%
fma-udef68.9%
fma-udef68.9%
unpow268.9%
+-commutative68.9%
associate-+r+68.9%
+-commutative68.9%
+-commutative68.9%
unpow268.9%
fma-def68.9%
+-commutative68.9%
fma-def68.9%
Simplified68.9%
Taylor expanded in F around -inf 99.9%
if -1.6499999999999999e24 < F < -5.59999999999999971e-53Initial program 99.7%
Taylor expanded in B around 0 94.1%
if -5.59999999999999971e-53 < F < 1.7e-4Initial program 99.5%
Taylor expanded in B around 0 84.7%
if 1.7e-4 < F Initial program 57.2%
distribute-lft-neg-in57.2%
+-commutative57.2%
cancel-sign-sub-inv57.2%
Simplified70.3%
clear-num70.3%
inv-pow70.3%
fma-def70.3%
fma-udef70.3%
*-commutative70.3%
fma-def70.3%
fma-def70.3%
Applied egg-rr70.3%
unpow-170.3%
fma-udef70.3%
fma-udef70.3%
unpow270.3%
+-commutative70.3%
associate-+r+70.3%
+-commutative70.3%
+-commutative70.3%
unpow270.3%
fma-def70.3%
+-commutative70.3%
fma-def70.3%
Simplified70.3%
Taylor expanded in B around inf 70.3%
Taylor expanded in F around inf 96.2%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (* x 2.0) (+ 2.0 (* F F))) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -1.65e+24)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -3.4e-57)
(- (* t_0 (* F (/ 1.0 (sin B)))) (/ x B))
(if (<= F 0.00017)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(-
(* F (/ 1.0 (* (sin B) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
t_1))))))
double code(double F, double B, double x) {
double t_0 = pow(((x * 2.0) + (2.0 + (F * F))), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -3.4e-57) {
tmp = (t_0 * (F * (1.0 / sin(B)))) - (x / B);
} else if (F <= 0.00017) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else {
tmp = (F * (1.0 / (sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - 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 = ((x * 2.0d0) + (2.0d0 + (f * f))) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-1.65d+24)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-3.4d-57)) then
tmp = (t_0 * (f * (1.0d0 / sin(b)))) - (x / b)
else if (f <= 0.00017d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else
tmp = (f * (1.0d0 / (sin(b) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((x * 2.0) + (2.0 + (F * F))), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -3.4e-57) {
tmp = (t_0 * (F * (1.0 / Math.sin(B)))) - (x / B);
} else if (F <= 0.00017) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else {
tmp = (F * (1.0 / (Math.sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((x * 2.0) + (2.0 + (F * F))), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -1.65e+24: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -3.4e-57: tmp = (t_0 * (F * (1.0 / math.sin(B)))) - (x / B) elif F <= 0.00017: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) else: tmp = (F * (1.0 / (math.sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65e+24) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -3.4e-57) tmp = Float64(Float64(t_0 * Float64(F * Float64(1.0 / sin(B)))) - Float64(x / B)); elseif (F <= 0.00017) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((x * 2.0) + (2.0 + (F * F))) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -1.65e+24) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -3.4e-57) tmp = (t_0 * (F * (1.0 / sin(B)))) - (x / B); elseif (F <= 0.00017) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); else tmp = (F * (1.0 / (sin(B) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.65e+24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.4e-57], N[(N[(t$95$0 * N[(F * N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00017], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -3.4 \cdot 10^{-57}:\\
\;\;\;\;t_0 \cdot \left(F \cdot \frac{1}{\sin B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.00017:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)} - t_1\\
\end{array}
\end{array}
if F < -1.6499999999999999e24Initial program 52.3%
distribute-lft-neg-in52.3%
+-commutative52.3%
cancel-sign-sub-inv52.3%
Simplified69.0%
clear-num68.9%
inv-pow68.9%
fma-def68.9%
fma-udef68.9%
*-commutative68.9%
fma-def68.9%
fma-def68.9%
Applied egg-rr68.9%
unpow-168.9%
fma-udef68.9%
fma-udef68.9%
unpow268.9%
+-commutative68.9%
associate-+r+68.9%
+-commutative68.9%
+-commutative68.9%
unpow268.9%
fma-def68.9%
+-commutative68.9%
fma-def68.9%
Simplified68.9%
Taylor expanded in F around -inf 99.9%
if -1.6499999999999999e24 < F < -3.40000000000000016e-57Initial program 99.7%
Taylor expanded in B around 0 94.1%
clear-num94.1%
associate-/r/94.1%
Applied egg-rr94.1%
if -3.40000000000000016e-57 < F < 1.7e-4Initial program 99.5%
Taylor expanded in B around 0 84.7%
if 1.7e-4 < F Initial program 57.2%
distribute-lft-neg-in57.2%
+-commutative57.2%
cancel-sign-sub-inv57.2%
Simplified70.3%
clear-num70.3%
inv-pow70.3%
fma-def70.3%
fma-udef70.3%
*-commutative70.3%
fma-def70.3%
fma-def70.3%
Applied egg-rr70.3%
unpow-170.3%
fma-udef70.3%
fma-udef70.3%
unpow270.3%
+-commutative70.3%
associate-+r+70.3%
+-commutative70.3%
+-commutative70.3%
unpow270.3%
fma-def70.3%
+-commutative70.3%
fma-def70.3%
Simplified70.3%
Taylor expanded in B around inf 70.3%
Taylor expanded in F around inf 96.2%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.65e+24)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.5e-155)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x B))
(if (<= F 1.16e-95)
(/ (- x) (tan B))
(if (<= F 1.2e-15)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ 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 <= -1.65e+24) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.5e-155) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / B);
} else if (F <= 1.16e-95) {
tmp = -x / tan(B);
} else if (F <= 1.2e-15) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (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 <= (-1.65d+24)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.5d-155)) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
else if (f <= 1.16d-95) then
tmp = -x / tan(b)
else if (f <= 1.2d-15) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (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 <= -1.65e+24) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.5e-155) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
} else if (F <= 1.16e-95) {
tmp = -x / Math.tan(B);
} else if (F <= 1.2e-15) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (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 <= -1.65e+24: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.5e-155: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) elif F <= 1.16e-95: tmp = -x / math.tan(B) elif F <= 1.2e-15: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (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 <= -1.65e+24) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.5e-155) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)); elseif (F <= 1.16e-95) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1.2e-15) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - 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 <= -1.65e+24) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.5e-155) tmp = (F * (sqrt(0.5) / sin(B))) - (x / B); elseif (F <= 1.16e-95) tmp = -x / tan(B); elseif (F <= 1.2e-15) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (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, -1.65e+24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.5e-155], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.16e-95], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-15], N[(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] - 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 -1.65 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -2.5 \cdot 10^{-155}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.16 \cdot 10^{-95}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-15}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.6499999999999999e24Initial program 52.3%
distribute-lft-neg-in52.3%
+-commutative52.3%
cancel-sign-sub-inv52.3%
Simplified69.0%
clear-num68.9%
inv-pow68.9%
fma-def68.9%
fma-udef68.9%
*-commutative68.9%
fma-def68.9%
fma-def68.9%
Applied egg-rr68.9%
unpow-168.9%
fma-udef68.9%
fma-udef68.9%
unpow268.9%
+-commutative68.9%
associate-+r+68.9%
+-commutative68.9%
+-commutative68.9%
unpow268.9%
fma-def68.9%
+-commutative68.9%
fma-def68.9%
Simplified68.9%
Taylor expanded in F around -inf 99.9%
if -1.6499999999999999e24 < F < -2.4999999999999999e-155Initial program 99.3%
Taylor expanded in B around 0 83.9%
Taylor expanded in F around 0 82.2%
Taylor expanded in x around 0 82.2%
associate-/l*82.4%
associate-/r/82.4%
Simplified82.4%
if -2.4999999999999999e-155 < F < 1.15999999999999997e-95Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 82.7%
associate-*r/82.7%
*-commutative82.7%
associate-*r*82.7%
mul-1-neg82.7%
Simplified82.7%
expm1-log1p-u56.6%
expm1-udef23.8%
associate-/l*23.8%
tan-quot23.8%
Applied egg-rr23.8%
expm1-def56.6%
expm1-log1p82.7%
Simplified82.7%
if 1.15999999999999997e-95 < F < 1.19999999999999997e-15Initial program 99.4%
Taylor expanded in B around 0 87.0%
Taylor expanded in F around 0 87.0%
if 1.19999999999999997e-15 < F Initial program 58.2%
distribute-lft-neg-in58.2%
+-commutative58.2%
cancel-sign-sub-inv58.2%
Simplified70.9%
clear-num71.0%
inv-pow71.0%
fma-def71.0%
fma-udef71.0%
*-commutative71.0%
fma-def71.0%
fma-def71.0%
Applied egg-rr71.0%
unpow-171.0%
fma-udef71.0%
fma-udef71.0%
unpow271.0%
+-commutative71.0%
associate-+r+71.0%
+-commutative71.0%
+-commutative71.0%
unpow271.0%
fma-def71.0%
+-commutative71.0%
fma-def71.0%
Simplified71.0%
Taylor expanded in F around inf 96.1%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* F (/ (sqrt 0.5) (sin B))) (/ x B))) (t_1 (/ x (tan B))))
(if (<= F -1.65e+24)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.25e-156)
t_0
(if (<= F 2.65e-95)
(/ (- x) (tan B))
(if (<= F 3.3e-7) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F * (sqrt(0.5) / sin(B))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.25e-156) {
tmp = t_0;
} else if (F <= 2.65e-95) {
tmp = -x / tan(B);
} else if (F <= 3.3e-7) {
tmp = t_0;
} 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 * (sqrt(0.5d0) / sin(b))) - (x / b)
t_1 = x / tan(b)
if (f <= (-1.65d+24)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.25d-156)) then
tmp = t_0
else if (f <= 2.65d-95) then
tmp = -x / tan(b)
else if (f <= 3.3d-7) then
tmp = t_0
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 = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.65e+24) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.25e-156) {
tmp = t_0;
} else if (F <= 2.65e-95) {
tmp = -x / Math.tan(B);
} else if (F <= 3.3e-7) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.65e+24: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.25e-156: tmp = t_0 elif F <= 2.65e-95: tmp = -x / math.tan(B) elif F <= 3.3e-7: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65e+24) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.25e-156) tmp = t_0; elseif (F <= 2.65e-95) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 3.3e-7) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F * (sqrt(0.5) / sin(B))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.65e+24) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.25e-156) tmp = t_0; elseif (F <= 2.65e-95) tmp = -x / tan(B); elseif (F <= 3.3e-7) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.65e+24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.25e-156], t$95$0, If[LessEqual[F, 2.65e-95], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-7], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.65 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.25 \cdot 10^{-156}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.65 \cdot 10^{-95}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-7}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -1.6499999999999999e24Initial program 52.3%
distribute-lft-neg-in52.3%
+-commutative52.3%
cancel-sign-sub-inv52.3%
Simplified69.0%
clear-num68.9%
inv-pow68.9%
fma-def68.9%
fma-udef68.9%
*-commutative68.9%
fma-def68.9%
fma-def68.9%
Applied egg-rr68.9%
unpow-168.9%
fma-udef68.9%
fma-udef68.9%
unpow268.9%
+-commutative68.9%
associate-+r+68.9%
+-commutative68.9%
+-commutative68.9%
unpow268.9%
fma-def68.9%
+-commutative68.9%
fma-def68.9%
Simplified68.9%
Taylor expanded in F around -inf 99.9%
if -1.6499999999999999e24 < F < -4.25e-156 or 2.6499999999999999e-95 < F < 3.3000000000000002e-7Initial program 99.3%
Taylor expanded in B around 0 84.6%
Taylor expanded in F around 0 83.3%
Taylor expanded in x around 0 83.1%
associate-/l*83.3%
associate-/r/83.3%
Simplified83.3%
if -4.25e-156 < F < 2.6499999999999999e-95Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 82.7%
associate-*r/82.7%
*-commutative82.7%
associate-*r*82.7%
mul-1-neg82.7%
Simplified82.7%
expm1-log1p-u56.6%
expm1-udef23.8%
associate-/l*23.8%
tan-quot23.8%
Applied egg-rr23.8%
expm1-def56.6%
expm1-log1p82.7%
Simplified82.7%
if 3.3000000000000002e-7 < F Initial program 58.2%
distribute-lft-neg-in58.2%
+-commutative58.2%
cancel-sign-sub-inv58.2%
Simplified70.9%
clear-num71.0%
inv-pow71.0%
fma-def71.0%
fma-udef71.0%
*-commutative71.0%
fma-def71.0%
fma-def71.0%
Applied egg-rr71.0%
unpow-171.0%
fma-udef71.0%
fma-udef71.0%
unpow271.0%
+-commutative71.0%
associate-+r+71.0%
+-commutative71.0%
+-commutative71.0%
unpow271.0%
fma-def71.0%
+-commutative71.0%
fma-def71.0%
Simplified71.0%
Taylor expanded in F around inf 96.1%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.012)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.2e-108)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 1.85e-74) (/ (- 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.012) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.2e-108) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 1.85e-74) {
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.012d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.2d-108)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 1.85d-74) 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.012) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.2e-108) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 1.85e-74) {
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.012: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.2e-108: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 1.85e-74: 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.012) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.2e-108) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 1.85e-74) 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.012) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.2e-108) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 1.85e-74) 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.012], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.2e-108], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-74], 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.012:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-108}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-74}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.012Initial program 53.0%
distribute-lft-neg-in53.0%
+-commutative53.0%
cancel-sign-sub-inv53.0%
Simplified69.4%
clear-num69.4%
inv-pow69.4%
fma-def69.4%
fma-udef69.4%
*-commutative69.4%
fma-def69.4%
fma-def69.4%
Applied egg-rr69.4%
unpow-169.4%
fma-udef69.4%
fma-udef69.4%
unpow269.4%
+-commutative69.4%
associate-+r+69.4%
+-commutative69.4%
+-commutative69.4%
unpow269.4%
fma-def69.4%
+-commutative69.4%
fma-def69.4%
Simplified69.4%
Taylor expanded in F around -inf 99.9%
if -0.012 < F < -3.2e-108Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 96.2%
Taylor expanded in x around 0 71.9%
associate-/l*72.2%
Simplified72.2%
if -3.2e-108 < F < 1.84999999999999997e-74Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 76.2%
associate-*r/76.2%
*-commutative76.2%
associate-*r*76.2%
mul-1-neg76.2%
Simplified76.2%
expm1-log1p-u53.8%
expm1-udef22.0%
associate-/l*22.0%
tan-quot22.0%
Applied egg-rr22.0%
expm1-def53.8%
expm1-log1p76.3%
Simplified76.3%
if 1.84999999999999997e-74 < F Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified73.0%
clear-num73.1%
inv-pow73.1%
fma-def73.1%
fma-udef73.1%
*-commutative73.1%
fma-def73.1%
fma-def73.1%
Applied egg-rr73.1%
unpow-173.1%
fma-udef73.1%
fma-udef73.1%
unpow273.1%
+-commutative73.1%
associate-+r+73.1%
+-commutative73.1%
+-commutative73.1%
unpow273.1%
fma-def73.1%
+-commutative73.1%
fma-def73.1%
Simplified73.1%
Taylor expanded in F around inf 91.4%
Final simplification88.3%
(FPCore (F B x)
:precision binary64
(if (<= F -0.055)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.6e-107)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 12.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.055) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.6e-107) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 12.0) {
tmp = -x / tan(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 <= (-0.055d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.6d-107)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 12.0d0) then
tmp = -x / tan(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 <= -0.055) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.6e-107) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 12.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.055: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.6e-107: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 12.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.055) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.6e-107) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 12.0) tmp = Float64(Float64(-x) / tan(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 <= -0.055) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.6e-107) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 12.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.055], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.6e-107], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 12.0], N[((-x) / N[Tan[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 -0.055:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-107}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 12:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0550000000000000003Initial program 53.0%
Taylor expanded in B around 0 32.7%
Taylor expanded in F around -inf 78.5%
if -0.0550000000000000003 < F < -4.60000000000000007e-107Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 96.2%
Taylor expanded in x around 0 71.9%
associate-/l*72.2%
Simplified72.2%
if -4.60000000000000007e-107 < F < 12Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 71.1%
associate-*r/71.1%
*-commutative71.1%
associate-*r*71.1%
mul-1-neg71.1%
Simplified71.1%
expm1-log1p-u48.4%
expm1-udef21.2%
associate-/l*21.2%
tan-quot21.2%
Applied egg-rr21.2%
expm1-def48.4%
expm1-log1p71.2%
Simplified71.2%
if 12 < F Initial program 55.1%
Taylor expanded in B around 0 34.7%
Taylor expanded in F around inf 77.2%
Final simplification75.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0027)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.25e-106)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 0.32) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0027) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.25e-106) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 0.32) {
tmp = -x / tan(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 <= (-0.0027d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.25d-106)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 0.32d0) then
tmp = -x / tan(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 <= -0.0027) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.25e-106) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 0.32) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0027: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.25e-106: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 0.32: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0027) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.25e-106) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 0.32) tmp = Float64(Float64(-x) / tan(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 <= -0.0027) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.25e-106) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 0.32) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0027], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e-106], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.32], N[((-x) / N[Tan[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 -0.0027:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-106}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 0.32:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0027000000000000001Initial program 53.0%
distribute-lft-neg-in53.0%
+-commutative53.0%
cancel-sign-sub-inv53.0%
Simplified69.4%
clear-num69.4%
inv-pow69.4%
fma-def69.4%
fma-udef69.4%
*-commutative69.4%
fma-def69.4%
fma-def69.4%
Applied egg-rr69.4%
unpow-169.4%
fma-udef69.4%
fma-udef69.4%
unpow269.4%
+-commutative69.4%
associate-+r+69.4%
+-commutative69.4%
+-commutative69.4%
unpow269.4%
fma-def69.4%
+-commutative69.4%
fma-def69.4%
Simplified69.4%
Taylor expanded in F around -inf 99.9%
if -0.0027000000000000001 < F < -1.24999999999999996e-106Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 96.2%
Taylor expanded in x around 0 71.9%
associate-/l*72.2%
Simplified72.2%
if -1.24999999999999996e-106 < F < 0.320000000000000007Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 71.1%
associate-*r/71.1%
*-commutative71.1%
associate-*r*71.1%
mul-1-neg71.1%
Simplified71.1%
expm1-log1p-u48.4%
expm1-udef21.2%
associate-/l*21.2%
tan-quot21.2%
Applied egg-rr21.2%
expm1-def48.4%
expm1-log1p71.2%
Simplified71.2%
if 0.320000000000000007 < F Initial program 55.1%
Taylor expanded in B around 0 34.7%
Taylor expanded in F around inf 77.2%
Final simplification81.2%
(FPCore (F B x) :precision binary64 (if (<= F -2e+80) (- (/ -1.0 B) (/ x B)) (if (<= F 6.3e-145) (/ (- x) (tan B)) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e+80) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 6.3e-145) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - (x / tan(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+80)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 6.3d-145) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2e+80) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 6.3e-145) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e+80: tmp = (-1.0 / B) - (x / B) elif F <= 6.3e-145: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e+80) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 6.3e-145) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2e+80) tmp = (-1.0 / B) - (x / B); elseif (F <= 6.3e-145) tmp = -x / tan(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e+80], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.3e-145], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{+80}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.3 \cdot 10^{-145}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2e80Initial program 43.6%
Taylor expanded in B around 0 37.4%
Taylor expanded in B around 0 22.7%
Taylor expanded in F around -inf 54.1%
if -2e80 < F < 6.3000000000000001e-145Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 66.9%
associate-*r/66.9%
*-commutative66.9%
associate-*r*66.9%
mul-1-neg66.9%
Simplified66.9%
expm1-log1p-u41.0%
expm1-udef18.2%
associate-/l*18.2%
tan-quot18.2%
Applied egg-rr18.2%
expm1-def41.0%
expm1-log1p66.9%
Simplified66.9%
if 6.3000000000000001e-145 < F Initial program 65.3%
distribute-lft-neg-in65.3%
+-commutative65.3%
cancel-sign-sub-inv65.3%
Simplified75.8%
Taylor expanded in F around inf 84.9%
Taylor expanded in B around 0 70.7%
Final simplification65.5%
(FPCore (F B x) :precision binary64 (if (<= F -6.8e+78) (- (/ -1.0 B) (/ x B)) (if (<= F 2.4) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.8e+78) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 2.4) {
tmp = -x / tan(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 <= (-6.8d+78)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 2.4d0) then
tmp = -x / tan(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 <= -6.8e+78) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 2.4) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.8e+78: tmp = (-1.0 / B) - (x / B) elif F <= 2.4: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.8e+78) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 2.4) tmp = Float64(Float64(-x) / tan(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 <= -6.8e+78) tmp = (-1.0 / B) - (x / B); elseif (F <= 2.4) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.8e+78], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4], N[((-x) / N[Tan[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 -6.8 \cdot 10^{+78}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.4:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.80000000000000014e78Initial program 43.6%
Taylor expanded in B around 0 37.4%
Taylor expanded in B around 0 22.7%
Taylor expanded in F around -inf 54.1%
if -6.80000000000000014e78 < F < 2.39999999999999991Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 64.7%
associate-*r/64.7%
*-commutative64.7%
associate-*r*64.7%
mul-1-neg64.7%
Simplified64.7%
expm1-log1p-u40.4%
expm1-udef19.2%
associate-/l*19.2%
tan-quot19.2%
Applied egg-rr19.2%
expm1-def40.4%
expm1-log1p64.7%
Simplified64.7%
if 2.39999999999999991 < F Initial program 55.1%
Taylor expanded in B around 0 34.7%
Taylor expanded in F around inf 77.2%
Final simplification66.2%
(FPCore (F B x) :precision binary64 (if (<= F -2.7e+52) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 30.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e+52) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 30.0) {
tmp = -x / tan(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+52)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 30.0d0) then
tmp = -x / tan(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+52) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 30.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.7e+52: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 30.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.7e+52) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 30.0) tmp = Float64(Float64(-x) / tan(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+52) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 30.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.7e+52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 30.0], N[((-x) / N[Tan[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^{+52}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 30:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.7e52Initial program 47.1%
Taylor expanded in B around 0 31.8%
Taylor expanded in F around -inf 83.4%
if -2.7e52 < F < 30Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 65.1%
associate-*r/65.1%
*-commutative65.1%
associate-*r*65.1%
mul-1-neg65.1%
Simplified65.1%
expm1-log1p-u41.7%
expm1-udef19.8%
associate-/l*19.8%
tan-quot19.8%
Applied egg-rr19.8%
expm1-def41.7%
expm1-log1p65.1%
Simplified65.1%
if 30 < F Initial program 55.1%
Taylor expanded in B around 0 34.7%
Taylor expanded in F around inf 77.2%
Final simplification73.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.7e-34) (- (/ -1.0 B) (/ x B)) (if (<= F 5.5e-6) (/ (- x) (sin B)) (/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-34) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 5.5e-6) {
tmp = -x / sin(B);
} else {
tmp = 1.0 / sin(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.7d-34)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 5.5d-6) then
tmp = -x / sin(b)
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-34) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 5.5e-6) {
tmp = -x / Math.sin(B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-34: tmp = (-1.0 / B) - (x / B) elif F <= 5.5e-6: tmp = -x / math.sin(B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-34) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 5.5e-6) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e-34) tmp = (-1.0 / B) - (x / B); elseif (F <= 5.5e-6) tmp = -x / sin(B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-34], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-6], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.7e-34Initial program 56.6%
Taylor expanded in B around 0 43.4%
Taylor expanded in B around 0 24.6%
Taylor expanded in F around -inf 47.7%
if -1.7e-34 < F < 5.4999999999999999e-6Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 68.2%
associate-*r/68.2%
*-commutative68.2%
associate-*r*68.2%
mul-1-neg68.2%
Simplified68.2%
Taylor expanded in B around 0 33.0%
neg-mul-133.0%
Simplified33.0%
if 5.4999999999999999e-6 < F Initial program 57.7%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 73.2%
Taylor expanded in B around inf 54.8%
Final simplification44.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.35e+79) (- (/ -1.0 B) (/ x B)) (if (<= F 43.0) (/ (- x) (tan B)) (/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.35e+79) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 43.0) {
tmp = -x / tan(B);
} else {
tmp = 1.0 / sin(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.35d+79)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 43.0d0) then
tmp = -x / tan(b)
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.35e+79) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 43.0) {
tmp = -x / Math.tan(B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.35e+79: tmp = (-1.0 / B) - (x / B) elif F <= 43.0: tmp = -x / math.tan(B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.35e+79) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 43.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.35e+79) tmp = (-1.0 / B) - (x / B); elseif (F <= 43.0) tmp = -x / tan(B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.35e+79], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 43.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.35 \cdot 10^{+79}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 43:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.35000000000000011e79Initial program 43.6%
Taylor expanded in B around 0 37.4%
Taylor expanded in B around 0 22.7%
Taylor expanded in F around -inf 54.1%
if -2.35000000000000011e79 < F < 43Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 64.7%
associate-*r/64.7%
*-commutative64.7%
associate-*r*64.7%
mul-1-neg64.7%
Simplified64.7%
expm1-log1p-u40.4%
expm1-udef19.2%
associate-/l*19.2%
tan-quot19.2%
Applied egg-rr19.2%
expm1-def40.4%
expm1-log1p64.7%
Simplified64.7%
if 43 < F Initial program 55.1%
Taylor expanded in B around 0 34.7%
Taylor expanded in F around inf 77.2%
Taylor expanded in B around inf 57.6%
Final simplification60.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.25e-23)
(- (/ -1.0 B) (/ x B))
(if (<= F 3.4e-5)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-23) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 3.4e-5) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = 1.0 / sin(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.25d-23)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 3.4d-5) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-23) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 3.4e-5) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e-23: tmp = (-1.0 / B) - (x / B) elif F <= 3.4e-5: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e-23) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 3.4e-5) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.25e-23) tmp = (-1.0 / B) - (x / B); elseif (F <= 3.4e-5) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e-23], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-5], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.2500000000000001e-23Initial program 55.4%
Taylor expanded in B around 0 43.1%
Taylor expanded in B around 0 23.9%
Taylor expanded in F around -inf 47.6%
if -1.2500000000000001e-23 < F < 3.4e-5Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 68.2%
mul-1-neg68.2%
*-commutative68.2%
associate-*l/68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in B around 0 29.8%
*-commutative29.8%
distribute-rgt-out--29.8%
metadata-eval29.8%
Simplified29.8%
if 3.4e-5 < F Initial program 57.2%
Taylor expanded in B around 0 35.7%
Taylor expanded in F around inf 74.0%
Taylor expanded in B around inf 55.4%
Final simplification43.6%
(FPCore (F B x)
:precision binary64
(if (<= F -2.2e-36)
(- (/ -1.0 B) (/ x B))
(if (<= F 6.3e-145)
(/ (- x) B)
(+ (* 0.3333333333333333 (* B x)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-36) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 6.3e-145) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((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-36)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 6.3d-145) then
tmp = -x / b
else
tmp = (0.3333333333333333d0 * (b * x)) + ((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-36) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 6.3e-145) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.2e-36: tmp = (-1.0 / B) - (x / B) elif F <= 6.3e-145: tmp = -x / B else: tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.2e-36) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 6.3e-145) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.2e-36) tmp = (-1.0 / B) - (x / B); elseif (F <= 6.3e-145) tmp = -x / B; else tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.2e-36], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.3e-145], N[((-x) / B), $MachinePrecision], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.3 \cdot 10^{-145}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.1999999999999999e-36Initial program 56.6%
Taylor expanded in B around 0 43.4%
Taylor expanded in B around 0 24.6%
Taylor expanded in F around -inf 47.7%
if -2.1999999999999999e-36 < F < 6.3000000000000001e-145Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.5%
mul-1-neg70.5%
*-commutative70.5%
associate-*l/70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in B around 0 32.4%
if 6.3000000000000001e-145 < F Initial program 65.3%
Taylor expanded in B around 0 47.8%
Taylor expanded in F around inf 54.2%
Taylor expanded in B around 0 46.4%
associate--l+46.4%
*-commutative46.4%
div-sub46.4%
Simplified46.4%
Final simplification42.8%
(FPCore (F B x)
:precision binary64
(if (<= F -3.2e-24)
(- (/ -1.0 B) (/ x B))
(if (<= F 0.00018)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-24) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 0.00018) {
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 <= (-3.2d-24)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 0.00018d0) 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 <= -3.2e-24) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 0.00018) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.2e-24: tmp = (-1.0 / B) - (x / B) elif F <= 0.00018: 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 <= -3.2e-24) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 0.00018) 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 <= -3.2e-24) tmp = (-1.0 / B) - (x / B); elseif (F <= 0.00018) 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, -3.2e-24], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00018], 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 -3.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.00018:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.20000000000000012e-24Initial program 55.4%
Taylor expanded in B around 0 43.1%
Taylor expanded in B around 0 23.9%
Taylor expanded in F around -inf 47.6%
if -3.20000000000000012e-24 < F < 1.80000000000000011e-4Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 67.6%
mul-1-neg67.6%
*-commutative67.6%
associate-*l/67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in B around 0 29.6%
*-commutative29.6%
distribute-rgt-out--29.6%
metadata-eval29.6%
Simplified29.6%
if 1.80000000000000011e-4 < F Initial program 56.7%
Taylor expanded in B around 0 41.6%
Taylor expanded in F around inf 53.0%
Taylor expanded in B around 0 52.7%
Final simplification42.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.15e-33)
(- (/ -1.0 B) (/ x B))
(if (<= F 1.85e-144)
(/ (- x) B)
(+ (/ (- 1.0 x) B) (* B 0.16666666666666666)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-33) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.85e-144) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (B * 0.16666666666666666);
}
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.15d-33)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.85d-144) then
tmp = -x / b
else
tmp = ((1.0d0 - x) / b) + (b * 0.16666666666666666d0)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-33) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.85e-144) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (B * 0.16666666666666666);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-33: tmp = (-1.0 / B) - (x / B) elif F <= 1.85e-144: tmp = -x / B else: tmp = ((1.0 - x) / B) + (B * 0.16666666666666666) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-33) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.85e-144) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(B * 0.16666666666666666)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-33) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.85e-144) tmp = -x / B; else tmp = ((1.0 - x) / B) + (B * 0.16666666666666666); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-33], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-144], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-144}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + B \cdot 0.16666666666666666\\
\end{array}
\end{array}
if F < -1.14999999999999993e-33Initial program 56.6%
Taylor expanded in B around 0 43.4%
Taylor expanded in B around 0 24.6%
Taylor expanded in F around -inf 47.7%
if -1.14999999999999993e-33 < F < 1.8500000000000001e-144Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.9%
mul-1-neg70.9%
*-commutative70.9%
associate-*l/70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in B around 0 32.0%
if 1.8500000000000001e-144 < F Initial program 64.9%
Taylor expanded in B around 0 39.9%
Taylor expanded in F around inf 64.1%
Taylor expanded in B around 0 46.0%
associate--l+46.0%
*-commutative46.0%
div-sub46.0%
Simplified46.0%
Final simplification42.5%
(FPCore (F B x) :precision binary64 (if (<= F -5.5e-32) (- (/ -1.0 B) (/ x B)) (if (<= F 1.85e-144) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e-32) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.85e-144) {
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 <= (-5.5d-32)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.85d-144) 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 <= -5.5e-32) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.85e-144) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e-32: tmp = (-1.0 / B) - (x / B) elif F <= 1.85e-144: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e-32) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.85e-144) 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 <= -5.5e-32) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.85e-144) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e-32], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-144], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-144}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.50000000000000024e-32Initial program 56.6%
Taylor expanded in B around 0 43.4%
Taylor expanded in B around 0 24.6%
Taylor expanded in F around -inf 47.7%
if -5.50000000000000024e-32 < F < 1.8500000000000001e-144Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.9%
mul-1-neg70.9%
*-commutative70.9%
associate-*l/70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in B around 0 32.0%
if 1.8500000000000001e-144 < F Initial program 64.9%
Taylor expanded in B around 0 47.3%
Taylor expanded in F around inf 53.8%
Taylor expanded in B around 0 46.0%
Final simplification42.5%
(FPCore (F B x) :precision binary64 (if (<= F 1.85e-144) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.85e-144) {
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 <= 1.85d-144) 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 <= 1.85e-144) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.85e-144: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.85e-144) 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 <= 1.85e-144) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.85e-144], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.85 \cdot 10^{-144}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.8500000000000001e-144Initial program 77.5%
distribute-lft-neg-in77.5%
+-commutative77.5%
fma-def77.5%
+-commutative77.5%
*-commutative77.5%
fma-def77.5%
fma-def77.5%
metadata-eval77.5%
metadata-eval77.5%
associate-*r/77.6%
*-rgt-identity77.6%
Simplified77.6%
Taylor expanded in F around 0 56.7%
mul-1-neg56.7%
*-commutative56.7%
associate-*l/56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in B around 0 28.1%
if 1.8500000000000001e-144 < F Initial program 64.9%
Taylor expanded in B around 0 47.3%
Taylor expanded in F around inf 53.8%
Taylor expanded in B around 0 46.0%
Final simplification35.4%
(FPCore (F B x) :precision binary64 (if (<= F 3.2e+110) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 3.2e+110) {
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 (f <= 3.2d+110) 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 (F <= 3.2e+110) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 3.2e+110: tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 3.2e+110) 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 (F <= 3.2e+110) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 3.2e+110], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.2 \cdot 10^{+110}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 3.19999999999999994e110Initial program 82.7%
distribute-lft-neg-in82.7%
+-commutative82.7%
fma-def82.7%
+-commutative82.7%
*-commutative82.7%
fma-def82.7%
fma-def82.7%
metadata-eval82.7%
metadata-eval82.7%
associate-*r/82.8%
*-rgt-identity82.8%
Simplified82.8%
Taylor expanded in F around 0 54.7%
mul-1-neg54.7%
*-commutative54.7%
associate-*l/54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in B around 0 26.5%
if 3.19999999999999994e110 < F Initial program 29.7%
Taylor expanded in B around 0 29.7%
Taylor expanded in F around inf 49.0%
Taylor expanded in B around 0 59.9%
Taylor expanded in x around 0 44.7%
Final simplification30.0%
(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 72.4%
Taylor expanded in B around 0 56.8%
Taylor expanded in F around inf 46.7%
Taylor expanded in B around 0 29.0%
Taylor expanded in x around 0 13.1%
Final simplification13.1%
herbie shell --seed 2023264
(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))))))