
(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 33 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 -3.8e+144)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.5e+161)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+144) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.5e+161) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+144) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.5e+161) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+144], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.5e+161], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+144}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+161}:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.80000000000000026e144Initial program 32.1%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u46.2%
expm1-udef46.2%
div-inv46.2%
neg-mul-146.2%
fma-def46.2%
Applied egg-rr46.2%
expm1-def46.2%
expm1-log1p99.8%
rem-log-exp39.5%
fma-udef39.5%
neg-mul-139.5%
prod-exp33.1%
*-commutative33.1%
prod-exp39.5%
rem-log-exp99.8%
unsub-neg99.8%
Simplified99.8%
if -3.80000000000000026e144 < F < 3.49999999999999988e161Initial program 93.7%
+-commutative93.7%
unsub-neg93.7%
associate-*l/99.5%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
if 3.49999999999999988e161 < F Initial program 20.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -2.4e+32)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.35)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(+
t_0
(/ 1.0 (/ (sin B) (/ F (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.4e+32) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.35) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 + (1.0 / (sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F))))));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-2.4d+32)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.35d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = t_0 + (1.0d0 / (sin(b) / (f / (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.4e+32) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.35) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 + (1.0 / (Math.sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F))))));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.4e+32: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.35: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = t_0 + (1.0 / (math.sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.4e+32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.35) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(t_0 + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F))))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.4e+32) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.35) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = t_0 + (1.0 / (sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.4e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.35:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}}}}\\
\end{array}
\end{array}
if F < -2.39999999999999991e32Initial program 51.9%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u45.1%
expm1-udef45.1%
div-inv45.1%
neg-mul-145.1%
fma-def45.1%
Applied egg-rr45.1%
expm1-def45.1%
expm1-log1p99.7%
rem-log-exp44.4%
fma-udef44.4%
neg-mul-144.4%
prod-exp39.8%
*-commutative39.8%
prod-exp44.4%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -2.39999999999999991e32 < F < 1.3500000000000001Initial program 99.6%
if 1.3500000000000001 < F Initial program 47.4%
associate-*l/67.9%
+-commutative67.9%
*-commutative67.9%
fma-udef67.9%
fma-def67.9%
metadata-eval67.9%
metadata-eval67.9%
associate-/l*67.9%
fma-def67.9%
fma-udef67.9%
*-commutative67.9%
fma-def67.9%
fma-def67.9%
Applied egg-rr67.9%
clear-num67.9%
inv-pow67.9%
div-inv67.9%
pow-flip67.9%
metadata-eval67.9%
pow1/267.9%
Applied egg-rr67.9%
unpow-167.9%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -2.4e+32)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.35)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(+
(* x (/ -1.0 (tan B)))
(/ 1.0 (/ (sin B) (/ F (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+32) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.35) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / (sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F))))));
}
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.4d+32)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.35d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / (sin(b) / (f / (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+32) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.35) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / (Math.sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F))))));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e+32: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.35: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / (math.sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e+32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.35) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F))))))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.4e+32) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.35) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / (sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.35:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{\sin B}{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}}}}\\
\end{array}
\end{array}
if F < -2.39999999999999991e32Initial program 51.9%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u45.1%
expm1-udef45.1%
div-inv45.1%
neg-mul-145.1%
fma-def45.1%
Applied egg-rr45.1%
expm1-def45.1%
expm1-log1p99.7%
rem-log-exp44.4%
fma-udef44.4%
neg-mul-144.4%
prod-exp39.8%
*-commutative39.8%
prod-exp44.4%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -2.39999999999999991e32 < F < 1.3500000000000001Initial program 99.6%
div-inv99.7%
clear-num99.6%
Applied egg-rr99.6%
if 1.3500000000000001 < F Initial program 47.4%
associate-*l/67.9%
+-commutative67.9%
*-commutative67.9%
fma-udef67.9%
fma-def67.9%
metadata-eval67.9%
metadata-eval67.9%
associate-/l*67.9%
fma-def67.9%
fma-udef67.9%
*-commutative67.9%
fma-def67.9%
fma-def67.9%
Applied egg-rr67.9%
clear-num67.9%
inv-pow67.9%
div-inv67.9%
pow-flip67.9%
metadata-eval67.9%
pow1/267.9%
Applied egg-rr67.9%
unpow-167.9%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))) (t_1 (+ 2.0 (* x 2.0))))
(if (<= F -0.92)
(+ t_0 (/ 1.0 (/ (sin B) (/ F (- (/ (- -1.0 x) F) F)))))
(if (<= F 0.95)
(- (* F (* (/ 1.0 (sin B)) (sqrt (/ 1.0 t_1)))) (/ x (tan B)))
(+ t_0 (/ 1.0 (/ (sin B) (/ F (+ F (* 0.5 (/ t_1 F)))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.92) {
tmp = t_0 + (1.0 / (sin(B) / (F / (((-1.0 - x) / F) - F))));
} else if (F <= 0.95) {
tmp = (F * ((1.0 / sin(B)) * sqrt((1.0 / t_1)))) - (x / tan(B));
} else {
tmp = t_0 + (1.0 / (sin(B) / (F / (F + (0.5 * (t_1 / F))))));
}
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 * ((-1.0d0) / tan(b))
t_1 = 2.0d0 + (x * 2.0d0)
if (f <= (-0.92d0)) then
tmp = t_0 + (1.0d0 / (sin(b) / (f / ((((-1.0d0) - x) / f) - f))))
else if (f <= 0.95d0) then
tmp = (f * ((1.0d0 / sin(b)) * sqrt((1.0d0 / t_1)))) - (x / tan(b))
else
tmp = t_0 + (1.0d0 / (sin(b) / (f / (f + (0.5d0 * (t_1 / f))))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.92) {
tmp = t_0 + (1.0 / (Math.sin(B) / (F / (((-1.0 - x) / F) - F))));
} else if (F <= 0.95) {
tmp = (F * ((1.0 / Math.sin(B)) * Math.sqrt((1.0 / t_1)))) - (x / Math.tan(B));
} else {
tmp = t_0 + (1.0 / (Math.sin(B) / (F / (F + (0.5 * (t_1 / F))))));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = 2.0 + (x * 2.0) tmp = 0 if F <= -0.92: tmp = t_0 + (1.0 / (math.sin(B) / (F / (((-1.0 - x) / F) - F)))) elif F <= 0.95: tmp = (F * ((1.0 / math.sin(B)) * math.sqrt((1.0 / t_1)))) - (x / math.tan(B)) else: tmp = t_0 + (1.0 / (math.sin(B) / (F / (F + (0.5 * (t_1 / F)))))) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -0.92) tmp = Float64(t_0 + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(Float64(Float64(-1.0 - x) / F) - F))))); elseif (F <= 0.95) tmp = Float64(Float64(F * Float64(Float64(1.0 / sin(B)) * sqrt(Float64(1.0 / t_1)))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(F + Float64(0.5 * Float64(t_1 / F))))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -0.92) tmp = t_0 + (1.0 / (sin(B) / (F / (((-1.0 - x) / F) - F)))); elseif (F <= 0.95) tmp = (F * ((1.0 / sin(B)) * sqrt((1.0 / t_1)))) - (x / tan(B)); else tmp = t_0 + (1.0 / (sin(B) / (F / (F + (0.5 * (t_1 / F)))))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.92], N[(t$95$0 + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.95], N[(N[(F * N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(F + N[(0.5 * N[(t$95$1 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{\frac{F}{\frac{-1 - x}{F} - F}}}\\
\mathbf{elif}\;F \leq 0.95:\\
\;\;\;\;F \cdot \left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{t_1}}\right) - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{\frac{F}{F + 0.5 \cdot \frac{t_1}{F}}}}\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 56.9%
associate-*l/68.7%
+-commutative68.7%
*-commutative68.7%
fma-udef68.7%
fma-def68.7%
metadata-eval68.7%
metadata-eval68.7%
associate-/l*68.6%
fma-def68.6%
fma-udef68.6%
*-commutative68.6%
fma-def68.6%
fma-def68.6%
Applied egg-rr68.6%
clear-num68.6%
inv-pow68.6%
div-inv68.6%
pow-flip68.6%
metadata-eval68.6%
pow1/268.6%
Applied egg-rr68.6%
unpow-168.6%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in F around -inf 99.0%
neg-mul-199.0%
unsub-neg99.0%
associate-*r/99.0%
+-commutative99.0%
distribute-lft-in99.0%
metadata-eval99.0%
metadata-eval99.0%
associate-*r*99.0%
metadata-eval99.0%
distribute-lft-in99.0%
mul-1-neg99.0%
Simplified99.0%
if -0.92000000000000004 < F < 0.94999999999999996Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.6%
if 0.94999999999999996 < F Initial program 47.4%
associate-*l/67.9%
+-commutative67.9%
*-commutative67.9%
fma-udef67.9%
fma-def67.9%
metadata-eval67.9%
metadata-eval67.9%
associate-/l*67.9%
fma-def67.9%
fma-udef67.9%
*-commutative67.9%
fma-def67.9%
fma-def67.9%
Applied egg-rr67.9%
clear-num67.9%
inv-pow67.9%
div-inv67.9%
pow-flip67.9%
metadata-eval67.9%
pow1/267.9%
Applied egg-rr67.9%
unpow-167.9%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in F around inf 99.7%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))) (t_1 (+ 2.0 (* x 2.0))))
(if (<= F -1.05)
(+ t_0 (/ 1.0 (/ (sin B) (/ F (- (/ (- -1.0 x) F) F)))))
(if (<= F 0.98)
(- (* F (/ (sqrt (/ 1.0 t_1)) (sin B))) (/ x (tan B)))
(+ t_0 (/ 1.0 (/ (sin B) (/ F (+ F (* 0.5 (/ t_1 F)))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -1.05) {
tmp = t_0 + (1.0 / (sin(B) / (F / (((-1.0 - x) / F) - F))));
} else if (F <= 0.98) {
tmp = (F * (sqrt((1.0 / t_1)) / sin(B))) - (x / tan(B));
} else {
tmp = t_0 + (1.0 / (sin(B) / (F / (F + (0.5 * (t_1 / F))))));
}
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 * ((-1.0d0) / tan(b))
t_1 = 2.0d0 + (x * 2.0d0)
if (f <= (-1.05d0)) then
tmp = t_0 + (1.0d0 / (sin(b) / (f / ((((-1.0d0) - x) / f) - f))))
else if (f <= 0.98d0) then
tmp = (f * (sqrt((1.0d0 / t_1)) / sin(b))) - (x / tan(b))
else
tmp = t_0 + (1.0d0 / (sin(b) / (f / (f + (0.5d0 * (t_1 / f))))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = 2.0 + (x * 2.0);
double tmp;
if (F <= -1.05) {
tmp = t_0 + (1.0 / (Math.sin(B) / (F / (((-1.0 - x) / F) - F))));
} else if (F <= 0.98) {
tmp = (F * (Math.sqrt((1.0 / t_1)) / Math.sin(B))) - (x / Math.tan(B));
} else {
tmp = t_0 + (1.0 / (Math.sin(B) / (F / (F + (0.5 * (t_1 / F))))));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = 2.0 + (x * 2.0) tmp = 0 if F <= -1.05: tmp = t_0 + (1.0 / (math.sin(B) / (F / (((-1.0 - x) / F) - F)))) elif F <= 0.98: tmp = (F * (math.sqrt((1.0 / t_1)) / math.sin(B))) - (x / math.tan(B)) else: tmp = t_0 + (1.0 / (math.sin(B) / (F / (F + (0.5 * (t_1 / F)))))) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -1.05) tmp = Float64(t_0 + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(Float64(Float64(-1.0 - x) / F) - F))))); elseif (F <= 0.98) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / t_1)) / sin(B))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(F + Float64(0.5 * Float64(t_1 / F))))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -1.05) tmp = t_0 + (1.0 / (sin(B) / (F / (((-1.0 - x) / F) - F)))); elseif (F <= 0.98) tmp = (F * (sqrt((1.0 / t_1)) / sin(B))) - (x / tan(B)); else tmp = t_0 + (1.0 / (sin(B) / (F / (F + (0.5 * (t_1 / F)))))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.05], N[(t$95$0 + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.98], N[(N[(F * N[(N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(F + N[(0.5 * N[(t$95$1 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -1.05:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{\frac{F}{\frac{-1 - x}{F} - F}}}\\
\mathbf{elif}\;F \leq 0.98:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{t_1}}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{\frac{F}{F + 0.5 \cdot \frac{t_1}{F}}}}\\
\end{array}
\end{array}
if F < -1.05000000000000004Initial program 56.9%
associate-*l/68.7%
+-commutative68.7%
*-commutative68.7%
fma-udef68.7%
fma-def68.7%
metadata-eval68.7%
metadata-eval68.7%
associate-/l*68.6%
fma-def68.6%
fma-udef68.6%
*-commutative68.6%
fma-def68.6%
fma-def68.6%
Applied egg-rr68.6%
clear-num68.6%
inv-pow68.6%
div-inv68.6%
pow-flip68.6%
metadata-eval68.6%
pow1/268.6%
Applied egg-rr68.6%
unpow-168.6%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in F around -inf 99.0%
neg-mul-199.0%
unsub-neg99.0%
associate-*r/99.0%
+-commutative99.0%
distribute-lft-in99.0%
metadata-eval99.0%
metadata-eval99.0%
associate-*r*99.0%
metadata-eval99.0%
distribute-lft-in99.0%
mul-1-neg99.0%
Simplified99.0%
if -1.05000000000000004 < F < 0.97999999999999998Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.6%
if 0.97999999999999998 < F Initial program 47.4%
associate-*l/67.9%
+-commutative67.9%
*-commutative67.9%
fma-udef67.9%
fma-def67.9%
metadata-eval67.9%
metadata-eval67.9%
associate-/l*67.9%
fma-def67.9%
fma-udef67.9%
*-commutative67.9%
fma-def67.9%
fma-def67.9%
Applied egg-rr67.9%
clear-num67.9%
inv-pow67.9%
div-inv67.9%
pow-flip67.9%
metadata-eval67.9%
pow1/267.9%
Applied egg-rr67.9%
unpow-167.9%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in F around inf 99.7%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.88)
(+ t_0 (/ 1.0 (/ (sin B) (/ F (- (/ (- -1.0 x) F) F)))))
(if (<= F 0.82)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x (tan B)))
(+
t_0
(/ 1.0 (/ (sin B) (/ F (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.88) {
tmp = t_0 + (1.0 / (sin(B) / (F / (((-1.0 - x) / F) - F))));
} else if (F <= 0.82) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / tan(B));
} else {
tmp = t_0 + (1.0 / (sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F))))));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.88d0)) then
tmp = t_0 + (1.0d0 / (sin(b) / (f / ((((-1.0d0) - x) / f) - f))))
else if (f <= 0.82d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / tan(b))
else
tmp = t_0 + (1.0d0 / (sin(b) / (f / (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.88) {
tmp = t_0 + (1.0 / (Math.sin(B) / (F / (((-1.0 - x) / F) - F))));
} else if (F <= 0.82) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / Math.tan(B));
} else {
tmp = t_0 + (1.0 / (Math.sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F))))));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.88: tmp = t_0 + (1.0 / (math.sin(B) / (F / (((-1.0 - x) / F) - F)))) elif F <= 0.82: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / math.tan(B)) else: tmp = t_0 + (1.0 / (math.sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.88) tmp = Float64(t_0 + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(Float64(Float64(-1.0 - x) / F) - F))))); elseif (F <= 0.82) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F))))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.88) tmp = t_0 + (1.0 / (sin(B) / (F / (((-1.0 - x) / F) - F)))); elseif (F <= 0.82) tmp = (F * (sqrt(0.5) / sin(B))) - (x / tan(B)); else tmp = t_0 + (1.0 / (sin(B) / (F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.88], N[(t$95$0 + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.82], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.88:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{\frac{F}{\frac{-1 - x}{F} - F}}}\\
\mathbf{elif}\;F \leq 0.82:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}}}}\\
\end{array}
\end{array}
if F < -0.880000000000000004Initial program 56.9%
associate-*l/68.7%
+-commutative68.7%
*-commutative68.7%
fma-udef68.7%
fma-def68.7%
metadata-eval68.7%
metadata-eval68.7%
associate-/l*68.6%
fma-def68.6%
fma-udef68.6%
*-commutative68.6%
fma-def68.6%
fma-def68.6%
Applied egg-rr68.6%
clear-num68.6%
inv-pow68.6%
div-inv68.6%
pow-flip68.6%
metadata-eval68.6%
pow1/268.6%
Applied egg-rr68.6%
unpow-168.6%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in F around -inf 99.0%
neg-mul-199.0%
unsub-neg99.0%
associate-*r/99.0%
+-commutative99.0%
distribute-lft-in99.0%
metadata-eval99.0%
metadata-eval99.0%
associate-*r*99.0%
metadata-eval99.0%
distribute-lft-in99.0%
mul-1-neg99.0%
Simplified99.0%
if -0.880000000000000004 < F < 0.819999999999999951Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.1%
if 0.819999999999999951 < F Initial program 47.4%
associate-*l/67.9%
+-commutative67.9%
*-commutative67.9%
fma-udef67.9%
fma-def67.9%
metadata-eval67.9%
metadata-eval67.9%
associate-/l*67.9%
fma-def67.9%
fma-udef67.9%
*-commutative67.9%
fma-def67.9%
fma-def67.9%
Applied egg-rr67.9%
clear-num67.9%
inv-pow67.9%
div-inv67.9%
pow-flip67.9%
metadata-eval67.9%
pow1/267.9%
Applied egg-rr67.9%
unpow-167.9%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -2.4e+32)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.6e-29)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1.2e-45)
(- (* (sqrt (/ 1.0 t_0)) (/ F B)) t_1)
(+
(* x (/ -1.0 (tan B)))
(/ 1.0 (/ (sin B) (/ F (+ F (* 0.5 (/ t_0 F))))))))))))
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 <= -2.4e+32) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.6e-29) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.2e-45) {
tmp = (sqrt((1.0 / t_0)) * (F / B)) - t_1;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / (sin(B) / (F / (F + (0.5 * (t_0 / F))))));
}
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 <= (-2.4d+32)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.6d-29)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1.2d-45) then
tmp = (sqrt((1.0d0 / t_0)) * (f / b)) - t_1
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / (sin(b) / (f / (f + (0.5d0 * (t_0 / f))))))
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 <= -2.4e+32) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.6e-29) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.2e-45) {
tmp = (Math.sqrt((1.0 / t_0)) * (F / B)) - t_1;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / (Math.sin(B) / (F / (F + (0.5 * (t_0 / F))))));
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -2.4e+32: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.6e-29: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1.2e-45: tmp = (math.sqrt((1.0 / t_0)) * (F / B)) - t_1 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / (math.sin(B) / (F / (F + (0.5 * (t_0 / F)))))) 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 <= -2.4e+32) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.6e-29) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 1.2e-45) tmp = Float64(Float64(sqrt(Float64(1.0 / t_0)) * Float64(F / B)) - t_1); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(F + Float64(0.5 * Float64(t_0 / F))))))); 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 <= -2.4e+32) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.6e-29) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1.2e-45) tmp = (sqrt((1.0 / t_0)) * (F / B)) - t_1; else tmp = (x * (-1.0 / tan(B))) + (1.0 / (sin(B) / (F / (F + (0.5 * (t_0 / F)))))); 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, -2.4e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.6e-29], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-45], N[(N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(F + N[(0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-29}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-45}:\\
\;\;\;\;\sqrt{\frac{1}{t_0}} \cdot \frac{F}{B} - t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{\sin B}{\frac{F}{F + 0.5 \cdot \frac{t_0}{F}}}}\\
\end{array}
\end{array}
if F < -2.39999999999999991e32Initial program 51.9%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u45.1%
expm1-udef45.1%
div-inv45.1%
neg-mul-145.1%
fma-def45.1%
Applied egg-rr45.1%
expm1-def45.1%
expm1-log1p99.7%
rem-log-exp44.4%
fma-udef44.4%
neg-mul-144.4%
prod-exp39.8%
*-commutative39.8%
prod-exp44.4%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -2.39999999999999991e32 < F < -1.6e-29Initial program 99.6%
Taylor expanded in B around 0 96.6%
if -1.6e-29 < F < 1.19999999999999995e-45Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 87.7%
if 1.19999999999999995e-45 < F Initial program 54.1%
associate-*l/72.0%
+-commutative72.0%
*-commutative72.0%
fma-udef72.0%
fma-def72.0%
metadata-eval72.0%
metadata-eval72.0%
associate-/l*72.0%
fma-def72.0%
fma-udef72.0%
*-commutative72.0%
fma-def72.0%
fma-def72.0%
Applied egg-rr72.0%
clear-num72.0%
inv-pow72.0%
div-inv72.0%
pow-flip72.0%
metadata-eval72.0%
pow1/272.0%
Applied egg-rr72.0%
unpow-172.0%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in F around inf 94.5%
Final simplification93.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.4e+32)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.8e-30)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.64)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.4e+32) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.8e-30) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.64) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.4d+32)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.8d-30)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.64d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.4e+32) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.8e-30) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.64) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.4e+32: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.8e-30: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.64: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.4e+32) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.8e-30) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.64) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.4e+32) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.8e-30) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.64) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.4e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.8e-30], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.64], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-30}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.64:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.39999999999999991e32Initial program 51.9%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u45.1%
expm1-udef45.1%
div-inv45.1%
neg-mul-145.1%
fma-def45.1%
Applied egg-rr45.1%
expm1-def45.1%
expm1-log1p99.7%
rem-log-exp44.4%
fma-udef44.4%
neg-mul-144.4%
prod-exp39.8%
*-commutative39.8%
prod-exp44.4%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -2.39999999999999991e32 < F < -3.8000000000000003e-30Initial program 99.6%
Taylor expanded in B around 0 96.6%
if -3.8000000000000003e-30 < F < 0.640000000000000013Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 84.6%
if 0.640000000000000013 < F Initial program 47.4%
Taylor expanded in F around inf 99.6%
Final simplification93.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00052)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.15e-29)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 0.85)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.00052) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.15e-29) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 0.85) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.00052d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.15d-29)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 0.85d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.00052) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.15e-29) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 0.85) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.00052: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.15e-29: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 0.85: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00052) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.15e-29) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 0.85) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.00052) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.15e-29) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 0.85) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00052], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.15e-29], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.85], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00052:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-29}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 0.85:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.19999999999999954e-4Initial program 56.9%
Taylor expanded in F around -inf 98.0%
expm1-log1p-u45.5%
expm1-udef45.5%
div-inv45.5%
neg-mul-145.5%
fma-def45.5%
Applied egg-rr45.5%
expm1-def45.5%
expm1-log1p98.0%
rem-log-exp45.1%
fma-udef45.1%
neg-mul-145.1%
prod-exp40.9%
*-commutative40.9%
prod-exp45.1%
rem-log-exp98.0%
unsub-neg98.0%
Simplified98.0%
if -5.19999999999999954e-4 < F < -1.14999999999999996e-29Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.2%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in F around 0 98.1%
Taylor expanded in x around 0 92.4%
associate-/l*92.8%
Simplified92.8%
if -1.14999999999999996e-29 < F < 0.849999999999999978Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 84.6%
if 0.849999999999999978 < F Initial program 47.4%
Taylor expanded in F around inf 99.6%
Final simplification92.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.035)
(+ t_0 (/ 1.0 (/ (sin B) (/ F (- (/ (- -1.0 x) F) F)))))
(if (<= F -1.08e-29)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 0.2)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x (tan B)))
(+ t_0 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.035) {
tmp = t_0 + (1.0 / (sin(B) / (F / (((-1.0 - x) / F) - F))));
} else if (F <= -1.08e-29) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 0.2) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / tan(B));
} else {
tmp = t_0 + (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) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.035d0)) then
tmp = t_0 + (1.0d0 / (sin(b) / (f / ((((-1.0d0) - x) / f) - f))))
else if (f <= (-1.08d-29)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 0.2d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / tan(b))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.035) {
tmp = t_0 + (1.0 / (Math.sin(B) / (F / (((-1.0 - x) / F) - F))));
} else if (F <= -1.08e-29) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 0.2) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / Math.tan(B));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.035: tmp = t_0 + (1.0 / (math.sin(B) / (F / (((-1.0 - x) / F) - F)))) elif F <= -1.08e-29: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 0.2: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / math.tan(B)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.035) tmp = Float64(t_0 + Float64(1.0 / Float64(sin(B) / Float64(F / Float64(Float64(Float64(-1.0 - x) / F) - F))))); elseif (F <= -1.08e-29) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 0.2) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.035) tmp = t_0 + (1.0 / (sin(B) / (F / (((-1.0 - x) / F) - F)))); elseif (F <= -1.08e-29) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 0.2) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / tan(B)); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.035], N[(t$95$0 + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.08e-29], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.2], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.035:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{\frac{F}{\frac{-1 - x}{F} - F}}}\\
\mathbf{elif}\;F \leq -1.08 \cdot 10^{-29}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 0.2:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.035000000000000003Initial program 56.9%
associate-*l/68.7%
+-commutative68.7%
*-commutative68.7%
fma-udef68.7%
fma-def68.7%
metadata-eval68.7%
metadata-eval68.7%
associate-/l*68.6%
fma-def68.6%
fma-udef68.6%
*-commutative68.6%
fma-def68.6%
fma-def68.6%
Applied egg-rr68.6%
clear-num68.6%
inv-pow68.6%
div-inv68.6%
pow-flip68.6%
metadata-eval68.6%
pow1/268.6%
Applied egg-rr68.6%
unpow-168.6%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in F around -inf 99.0%
neg-mul-199.0%
unsub-neg99.0%
associate-*r/99.0%
+-commutative99.0%
distribute-lft-in99.0%
metadata-eval99.0%
metadata-eval99.0%
associate-*r*99.0%
metadata-eval99.0%
distribute-lft-in99.0%
mul-1-neg99.0%
Simplified99.0%
if -0.035000000000000003 < F < -1.07999999999999995e-29Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.2%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in F around 0 98.1%
Taylor expanded in x around 0 92.4%
associate-/l*92.8%
Simplified92.8%
if -1.07999999999999995e-29 < F < 0.20000000000000001Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 84.6%
if 0.20000000000000001 < F Initial program 47.4%
Taylor expanded in F around inf 99.6%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -0.00014)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.58e-108)
(* t_0 (* F (sqrt 0.5)))
(if (<= F 2.3e-101)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 2.4e-58)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 12000000.0)
(+ t_1 (/ F (* B (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
(+ t_1 t_0))))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.00014) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.58e-108) {
tmp = t_0 * (F * sqrt(0.5));
} else if (F <= 2.3e-101) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 2.4e-58) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 12000000.0) {
tmp = t_1 + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else {
tmp = t_1 + 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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-0.00014d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.58d-108)) then
tmp = t_0 * (f * sqrt(0.5d0))
else if (f <= 2.3d-101) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 2.4d-58) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 12000000.0d0) then
tmp = t_1 + (f / (b * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
else
tmp = t_1 + t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.00014) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.58e-108) {
tmp = t_0 * (F * Math.sqrt(0.5));
} else if (F <= 2.3e-101) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 2.4e-58) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 12000000.0) {
tmp = t_1 + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else {
tmp = t_1 + t_0;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.00014: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.58e-108: tmp = t_0 * (F * math.sqrt(0.5)) elif F <= 2.3e-101: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 2.4e-58: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 12000000.0: tmp = t_1 + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) else: tmp = t_1 + t_0 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.00014) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.58e-108) tmp = Float64(t_0 * Float64(F * sqrt(0.5))); elseif (F <= 2.3e-101) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 2.4e-58) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 12000000.0) tmp = Float64(t_1 + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); else tmp = Float64(t_1 + t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.00014) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.58e-108) tmp = t_0 * (F * sqrt(0.5)); elseif (F <= 2.3e-101) tmp = (-x * cos(B)) / sin(B); elseif (F <= 2.4e-58) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 12000000.0) tmp = t_1 + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); else tmp = t_1 + t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00014], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.58e-108], N[(t$95$0 * N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-101], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-58], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 12000000.0], N[(t$95$1 + N[(F / N[(B * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.00014:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.58 \cdot 10^{-108}:\\
\;\;\;\;t_0 \cdot \left(F \cdot \sqrt{0.5}\right)\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-101}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-58}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 12000000:\\
\;\;\;\;t_1 + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 + t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999e-4Initial program 56.9%
Taylor expanded in F around -inf 98.0%
expm1-log1p-u45.5%
expm1-udef45.5%
div-inv45.5%
neg-mul-145.5%
fma-def45.5%
Applied egg-rr45.5%
expm1-def45.5%
expm1-log1p98.0%
rem-log-exp45.1%
fma-udef45.1%
neg-mul-145.1%
prod-exp40.9%
*-commutative40.9%
prod-exp45.1%
rem-log-exp98.0%
unsub-neg98.0%
Simplified98.0%
if -1.3999999999999999e-4 < F < -1.5799999999999999e-108Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 70.1%
div-inv70.3%
*-commutative70.3%
Applied egg-rr70.3%
if -1.5799999999999999e-108 < F < 2.2999999999999999e-101Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 91.2%
Taylor expanded in F around 0 86.0%
associate-*r/86.0%
*-commutative86.0%
associate-*r*86.0%
neg-mul-186.0%
Simplified86.0%
if 2.2999999999999999e-101 < F < 2.4000000000000001e-58Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 85.7%
associate-/l*85.7%
Simplified85.7%
if 2.4000000000000001e-58 < F < 1.2e7Initial program 94.8%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
clear-num99.6%
inv-pow99.6%
div-inv99.6%
pow-flip99.6%
metadata-eval99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow-199.6%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in F around inf 70.0%
Taylor expanded in B around 0 68.6%
if 1.2e7 < F Initial program 46.6%
Taylor expanded in F around inf 99.7%
Final simplification90.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -0.012)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -4.1e-108)
(* t_0 (* F (sqrt 0.5)))
(if (<= F 7.5e-102)
(+ t_1 (* (/ F (sin B)) (/ F x)))
(if (<= F 1.85e-58)
(/ (sqrt 0.5) (/ (sin B) F))
(if (<= F 12000000.0)
(+ t_1 (/ F (* B (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
(+ t_1 t_0))))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.012) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -4.1e-108) {
tmp = t_0 * (F * sqrt(0.5));
} else if (F <= 7.5e-102) {
tmp = t_1 + ((F / sin(B)) * (F / x));
} else if (F <= 1.85e-58) {
tmp = sqrt(0.5) / (sin(B) / F);
} else if (F <= 12000000.0) {
tmp = t_1 + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else {
tmp = t_1 + 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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-0.012d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-4.1d-108)) then
tmp = t_0 * (f * sqrt(0.5d0))
else if (f <= 7.5d-102) then
tmp = t_1 + ((f / sin(b)) * (f / x))
else if (f <= 1.85d-58) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else if (f <= 12000000.0d0) then
tmp = t_1 + (f / (b * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
else
tmp = t_1 + t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.012) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -4.1e-108) {
tmp = t_0 * (F * Math.sqrt(0.5));
} else if (F <= 7.5e-102) {
tmp = t_1 + ((F / Math.sin(B)) * (F / x));
} else if (F <= 1.85e-58) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else if (F <= 12000000.0) {
tmp = t_1 + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else {
tmp = t_1 + t_0;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.012: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -4.1e-108: tmp = t_0 * (F * math.sqrt(0.5)) elif F <= 7.5e-102: tmp = t_1 + ((F / math.sin(B)) * (F / x)) elif F <= 1.85e-58: tmp = math.sqrt(0.5) / (math.sin(B) / F) elif F <= 12000000.0: tmp = t_1 + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) else: tmp = t_1 + t_0 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.012) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -4.1e-108) tmp = Float64(t_0 * Float64(F * sqrt(0.5))); elseif (F <= 7.5e-102) tmp = Float64(t_1 + Float64(Float64(F / sin(B)) * Float64(F / x))); elseif (F <= 1.85e-58) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); elseif (F <= 12000000.0) tmp = Float64(t_1 + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); else tmp = Float64(t_1 + t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.012) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -4.1e-108) tmp = t_0 * (F * sqrt(0.5)); elseif (F <= 7.5e-102) tmp = t_1 + ((F / sin(B)) * (F / x)); elseif (F <= 1.85e-58) tmp = sqrt(0.5) / (sin(B) / F); elseif (F <= 12000000.0) tmp = t_1 + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); else tmp = t_1 + t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.012], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.1e-108], N[(t$95$0 * N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-102], N[(t$95$1 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(F / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-58], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 12000000.0], N[(t$95$1 + N[(F / N[(B * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.012:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4.1 \cdot 10^{-108}:\\
\;\;\;\;t_0 \cdot \left(F \cdot \sqrt{0.5}\right)\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-102}:\\
\;\;\;\;t_1 + \frac{F}{\sin B} \cdot \frac{F}{x}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-58}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 12000000:\\
\;\;\;\;t_1 + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 + t_0\\
\end{array}
\end{array}
if F < -0.012Initial program 56.9%
Taylor expanded in F around -inf 98.0%
expm1-log1p-u45.5%
expm1-udef45.5%
div-inv45.5%
neg-mul-145.5%
fma-def45.5%
Applied egg-rr45.5%
expm1-def45.5%
expm1-log1p98.0%
rem-log-exp45.1%
fma-udef45.1%
neg-mul-145.1%
prod-exp40.9%
*-commutative40.9%
prod-exp45.1%
rem-log-exp98.0%
unsub-neg98.0%
Simplified98.0%
if -0.012 < F < -4.10000000000000037e-108Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 70.1%
div-inv70.3%
*-commutative70.3%
Applied egg-rr70.3%
if -4.10000000000000037e-108 < F < 7.5000000000000008e-102Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-/l*99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
clear-num99.4%
inv-pow99.4%
div-inv99.4%
pow-flip99.5%
metadata-eval99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in F around inf 85.8%
Taylor expanded in x around inf 80.1%
unpow280.1%
times-frac86.0%
Simplified86.0%
if 7.5000000000000008e-102 < F < 1.8500000000000001e-58Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 85.7%
associate-/l*85.7%
Simplified85.7%
if 1.8500000000000001e-58 < F < 1.2e7Initial program 94.8%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
clear-num99.6%
inv-pow99.6%
div-inv99.6%
pow-flip99.6%
metadata-eval99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow-199.6%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in F around inf 70.0%
Taylor expanded in B around 0 68.6%
if 1.2e7 < F Initial program 46.6%
Taylor expanded in F around inf 99.7%
Final simplification90.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.039)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -3.2e-108) (and (not (<= F 2e-107)) (<= F 1.25e-57)))
(/ (sqrt 0.5) (/ (sin B) F))
(+
(* x (/ -1.0 (tan B)))
(/ F (* B (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.039) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -3.2e-108) || (!(F <= 2e-107) && (F <= 1.25e-57))) {
tmp = sqrt(0.5) / (sin(B) / F);
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
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.039d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-3.2d-108)) .or. (.not. (f <= 2d-107)) .and. (f <= 1.25d-57)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.039) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -3.2e-108) || (!(F <= 2e-107) && (F <= 1.25e-57))) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.039: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -3.2e-108) or (not (F <= 2e-107) and (F <= 1.25e-57)): tmp = math.sqrt(0.5) / (math.sin(B) / F) else: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.039) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -3.2e-108) || (!(F <= 2e-107) && (F <= 1.25e-57))) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.039) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -3.2e-108) || (~((F <= 2e-107)) && (F <= 1.25e-57))) tmp = sqrt(0.5) / (sin(B) / F); else tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.039], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -3.2e-108], And[N[Not[LessEqual[F, 2e-107]], $MachinePrecision], LessEqual[F, 1.25e-57]]], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.039:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-108} \lor \neg \left(F \leq 2 \cdot 10^{-107}\right) \land F \leq 1.25 \cdot 10^{-57}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\end{array}
\end{array}
if F < -0.0389999999999999999Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.0389999999999999999 < F < -3.2e-108 or 2e-107 < F < 1.25e-57Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 73.5%
associate-/l*73.5%
Simplified73.5%
if -3.2e-108 < F < 2e-107 or 1.25e-57 < F Initial program 74.8%
associate-*l/84.5%
+-commutative84.5%
*-commutative84.5%
fma-udef84.5%
fma-def84.5%
metadata-eval84.5%
metadata-eval84.5%
associate-/l*84.5%
fma-def84.5%
fma-udef84.5%
*-commutative84.5%
fma-def84.5%
fma-def84.5%
Applied egg-rr84.5%
clear-num84.5%
inv-pow84.5%
div-inv84.5%
pow-flip84.5%
metadata-eval84.5%
pow1/284.5%
Applied egg-rr84.5%
unpow-184.5%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in F around inf 90.0%
Taylor expanded in B around 0 81.5%
Final simplification80.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))))
(if (<= F -0.082)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.02e-108)
t_0
(if (<= F 1.35e-101)
(/ (- (cos B)) (/ (sin B) x))
(if (<= F 6.2e-59)
t_0
(+
(* x (/ -1.0 (tan B)))
(/ F (* B (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double tmp;
if (F <= -0.082) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.02e-108) {
tmp = t_0;
} else if (F <= 1.35e-101) {
tmp = -cos(B) / (sin(B) / x);
} else if (F <= 6.2e-59) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
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 = sqrt(0.5d0) / (sin(b) / f)
if (f <= (-0.082d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.02d-108)) then
tmp = t_0
else if (f <= 1.35d-101) then
tmp = -cos(b) / (sin(b) / x)
else if (f <= 6.2d-59) then
tmp = t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double tmp;
if (F <= -0.082) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.02e-108) {
tmp = t_0;
} else if (F <= 1.35e-101) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else if (F <= 6.2e-59) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) tmp = 0 if F <= -0.082: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.02e-108: tmp = t_0 elif F <= 1.35e-101: tmp = -math.cos(B) / (math.sin(B) / x) elif F <= 6.2e-59: tmp = t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) tmp = 0.0 if (F <= -0.082) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.02e-108) tmp = t_0; elseif (F <= 1.35e-101) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); elseif (F <= 6.2e-59) tmp = t_0; else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); tmp = 0.0; if (F <= -0.082) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.02e-108) tmp = t_0; elseif (F <= 1.35e-101) tmp = -cos(B) / (sin(B) / x); elseif (F <= 6.2e-59) tmp = t_0; else tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.082], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.02e-108], t$95$0, If[LessEqual[F, 1.35e-101], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-59], t$95$0, N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{if}\;F \leq -0.082:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-108}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-101}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-59}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\end{array}
\end{array}
if F < -0.0820000000000000034Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.0820000000000000034 < F < -1.02000000000000008e-108 or 1.3500000000000001e-101 < F < 6.19999999999999998e-59Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 73.5%
associate-/l*73.5%
Simplified73.5%
if -1.02000000000000008e-108 < F < 1.3500000000000001e-101Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 91.2%
Taylor expanded in F around 0 86.0%
mul-1-neg86.0%
associate-/l*85.9%
Simplified85.9%
if 6.19999999999999998e-59 < F Initial program 57.6%
associate-*l/74.1%
+-commutative74.1%
*-commutative74.1%
fma-udef74.1%
fma-def74.1%
metadata-eval74.1%
metadata-eval74.1%
associate-/l*74.1%
fma-def74.1%
fma-udef74.1%
*-commutative74.1%
fma-def74.1%
fma-def74.1%
Applied egg-rr74.1%
clear-num74.1%
inv-pow74.1%
div-inv74.1%
pow-flip74.1%
metadata-eval74.1%
pow1/274.1%
Applied egg-rr74.1%
unpow-174.1%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in F around inf 92.9%
Taylor expanded in B around 0 78.6%
Final simplification80.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (sqrt 0.5) (/ (sin B) F))))
(if (<= F -0.0055)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.32e-108)
t_0
(if (<= F 1.22e-101)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 1.02e-57)
t_0
(+
(* x (/ -1.0 (tan B)))
(/ F (* B (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) / (sin(B) / F);
double tmp;
if (F <= -0.0055) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.32e-108) {
tmp = t_0;
} else if (F <= 1.22e-101) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 1.02e-57) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
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 = sqrt(0.5d0) / (sin(b) / f)
if (f <= (-0.0055d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.32d-108)) then
tmp = t_0
else if (f <= 1.22d-101) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 1.02d-57) then
tmp = t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) / (Math.sin(B) / F);
double tmp;
if (F <= -0.0055) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.32e-108) {
tmp = t_0;
} else if (F <= 1.22e-101) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 1.02e-57) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) / (math.sin(B) / F) tmp = 0 if F <= -0.0055: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.32e-108: tmp = t_0 elif F <= 1.22e-101: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 1.02e-57: tmp = t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) / Float64(sin(B) / F)) tmp = 0.0 if (F <= -0.0055) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.32e-108) tmp = t_0; elseif (F <= 1.22e-101) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 1.02e-57) tmp = t_0; else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) / (sin(B) / F); tmp = 0.0; if (F <= -0.0055) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.32e-108) tmp = t_0; elseif (F <= 1.22e-101) tmp = (-x * cos(B)) / sin(B); elseif (F <= 1.02e-57) tmp = t_0; else tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0055], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.32e-108], t$95$0, If[LessEqual[F, 1.22e-101], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.02e-57], t$95$0, N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{if}\;F \leq -0.0055:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.32 \cdot 10^{-108}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-101}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\end{array}
\end{array}
if F < -0.0054999999999999997Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.0054999999999999997 < F < -1.31999999999999996e-108 or 1.2199999999999999e-101 < F < 1.02e-57Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 73.5%
associate-/l*73.5%
Simplified73.5%
if -1.31999999999999996e-108 < F < 1.2199999999999999e-101Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 91.2%
Taylor expanded in F around 0 86.0%
associate-*r/86.0%
*-commutative86.0%
associate-*r*86.0%
neg-mul-186.0%
Simplified86.0%
if 1.02e-57 < F Initial program 57.6%
associate-*l/74.1%
+-commutative74.1%
*-commutative74.1%
fma-udef74.1%
fma-def74.1%
metadata-eval74.1%
metadata-eval74.1%
associate-/l*74.1%
fma-def74.1%
fma-udef74.1%
*-commutative74.1%
fma-def74.1%
fma-def74.1%
Applied egg-rr74.1%
clear-num74.1%
inv-pow74.1%
div-inv74.1%
pow-flip74.1%
metadata-eval74.1%
pow1/274.1%
Applied egg-rr74.1%
unpow-174.1%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in F around inf 92.9%
Taylor expanded in B around 0 78.6%
Final simplification80.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.36)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.9e-108)
(* (/ 1.0 (sin B)) (* F (sqrt 0.5)))
(if (<= F 1.35e-101)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 5.3e-58)
(/ (sqrt 0.5) (/ (sin B) F))
(+
(* x (/ -1.0 (tan B)))
(/ F (* B (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.36) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.9e-108) {
tmp = (1.0 / sin(B)) * (F * sqrt(0.5));
} else if (F <= 1.35e-101) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 5.3e-58) {
tmp = sqrt(0.5) / (sin(B) / F);
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
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.36d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.9d-108)) then
tmp = (1.0d0 / sin(b)) * (f * sqrt(0.5d0))
else if (f <= 1.35d-101) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 5.3d-58) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.36) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.9e-108) {
tmp = (1.0 / Math.sin(B)) * (F * Math.sqrt(0.5));
} else if (F <= 1.35e-101) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 5.3e-58) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.36: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.9e-108: tmp = (1.0 / math.sin(B)) * (F * math.sqrt(0.5)) elif F <= 1.35e-101: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 5.3e-58: tmp = math.sqrt(0.5) / (math.sin(B) / F) else: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.36) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.9e-108) tmp = Float64(Float64(1.0 / sin(B)) * Float64(F * sqrt(0.5))); elseif (F <= 1.35e-101) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 5.3e-58) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.36) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.9e-108) tmp = (1.0 / sin(B)) * (F * sqrt(0.5)); elseif (F <= 1.35e-101) tmp = (-x * cos(B)) / sin(B); elseif (F <= 5.3e-58) tmp = sqrt(0.5) / (sin(B) / F); else tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.9e-108], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e-101], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.3e-58], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.36:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.9 \cdot 10^{-108}:\\
\;\;\;\;\frac{1}{\sin B} \cdot \left(F \cdot \sqrt{0.5}\right)\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-101}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{-58}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\end{array}
\end{array}
if F < -0.35999999999999999Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.35999999999999999 < F < -3.89999999999999995e-108Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 70.1%
div-inv70.3%
*-commutative70.3%
Applied egg-rr70.3%
if -3.89999999999999995e-108 < F < 1.3500000000000001e-101Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 91.2%
Taylor expanded in F around 0 86.0%
associate-*r/86.0%
*-commutative86.0%
associate-*r*86.0%
neg-mul-186.0%
Simplified86.0%
if 1.3500000000000001e-101 < F < 5.3000000000000003e-58Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 85.7%
associate-/l*85.7%
Simplified85.7%
if 5.3000000000000003e-58 < F Initial program 57.6%
associate-*l/74.1%
+-commutative74.1%
*-commutative74.1%
fma-udef74.1%
fma-def74.1%
metadata-eval74.1%
metadata-eval74.1%
associate-/l*74.1%
fma-def74.1%
fma-udef74.1%
*-commutative74.1%
fma-def74.1%
fma-def74.1%
Applied egg-rr74.1%
clear-num74.1%
inv-pow74.1%
div-inv74.1%
pow-flip74.1%
metadata-eval74.1%
pow1/274.1%
Applied egg-rr74.1%
unpow-174.1%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in F around inf 92.9%
Taylor expanded in B around 0 78.6%
Final simplification80.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0014)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.02e-108)
(* (/ 1.0 (sin B)) (* F (sqrt 0.5)))
(if (<= F 1.7e-103)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 6.9e-62)
(/ (sqrt 0.5) (/ (sin B) F))
(+
(* x (/ -1.0 (tan B)))
(/ F (* B (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0014) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.02e-108) {
tmp = (1.0 / sin(B)) * (F * sqrt(0.5));
} else if (F <= 1.7e-103) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 6.9e-62) {
tmp = sqrt(0.5) / (sin(B) / F);
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
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.0014d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.02d-108)) then
tmp = (1.0d0 / sin(b)) * (f * sqrt(0.5d0))
else if (f <= 1.7d-103) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 6.9d-62) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0014) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.02e-108) {
tmp = (1.0 / Math.sin(B)) * (F * Math.sqrt(0.5));
} else if (F <= 1.7e-103) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 6.9e-62) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0014: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.02e-108: tmp = (1.0 / math.sin(B)) * (F * math.sqrt(0.5)) elif F <= 1.7e-103: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 6.9e-62: tmp = math.sqrt(0.5) / (math.sin(B) / F) else: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0014) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.02e-108) tmp = Float64(Float64(1.0 / sin(B)) * Float64(F * sqrt(0.5))); elseif (F <= 1.7e-103) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 6.9e-62) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0014) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.02e-108) tmp = (1.0 / sin(B)) * (F * sqrt(0.5)); elseif (F <= 1.7e-103) tmp = (-x * cos(B)) / sin(B); elseif (F <= 6.9e-62) tmp = sqrt(0.5) / (sin(B) / F); else tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0014], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.02e-108], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-103], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.9e-62], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0014:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-108}:\\
\;\;\;\;\frac{1}{\sin B} \cdot \left(F \cdot \sqrt{0.5}\right)\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-103}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 6.9 \cdot 10^{-62}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\end{array}
\end{array}
if F < -0.00139999999999999999Initial program 56.9%
Taylor expanded in F around -inf 98.0%
expm1-log1p-u45.5%
expm1-udef45.5%
div-inv45.5%
neg-mul-145.5%
fma-def45.5%
Applied egg-rr45.5%
expm1-def45.5%
expm1-log1p98.0%
rem-log-exp45.1%
fma-udef45.1%
neg-mul-145.1%
prod-exp40.9%
*-commutative40.9%
prod-exp45.1%
rem-log-exp98.0%
unsub-neg98.0%
Simplified98.0%
if -0.00139999999999999999 < F < -1.02000000000000008e-108Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 70.1%
div-inv70.3%
*-commutative70.3%
Applied egg-rr70.3%
if -1.02000000000000008e-108 < F < 1.70000000000000001e-103Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 91.2%
Taylor expanded in F around 0 86.0%
associate-*r/86.0%
*-commutative86.0%
associate-*r*86.0%
neg-mul-186.0%
Simplified86.0%
if 1.70000000000000001e-103 < F < 6.89999999999999958e-62Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 85.7%
associate-/l*85.7%
Simplified85.7%
if 6.89999999999999958e-62 < F Initial program 57.6%
associate-*l/74.1%
+-commutative74.1%
*-commutative74.1%
fma-udef74.1%
fma-def74.1%
metadata-eval74.1%
metadata-eval74.1%
associate-/l*74.1%
fma-def74.1%
fma-udef74.1%
*-commutative74.1%
fma-def74.1%
fma-def74.1%
Applied egg-rr74.1%
clear-num74.1%
inv-pow74.1%
div-inv74.1%
pow-flip74.1%
metadata-eval74.1%
pow1/274.1%
Applied egg-rr74.1%
unpow-174.1%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in F around inf 92.9%
Taylor expanded in B around 0 78.6%
Final simplification85.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))) (t_1 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F -0.235)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.5e-145)
(- (+ (* 0.3333333333333333 (* B x)) (* t_1 (/ F B))) (/ x B))
(if (<= F -1.65e-307)
(+ t_0 (* (/ F B) (/ -1.0 F)))
(if (<= F 2.35e-138)
(/ (- (* F t_1) x) B)
(if (<= F 0.0235)
(+ t_0 (/ -1.0 B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -0.235) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.5e-145) {
tmp = ((0.3333333333333333 * (B * x)) + (t_1 * (F / B))) - (x / B);
} else if (F <= -1.65e-307) {
tmp = t_0 + ((F / B) * (-1.0 / F));
} else if (F <= 2.35e-138) {
tmp = ((F * t_1) - x) / B;
} else if (F <= 0.0235) {
tmp = t_0 + (-1.0 / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
if (f <= (-0.235d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.5d-145)) then
tmp = ((0.3333333333333333d0 * (b * x)) + (t_1 * (f / b))) - (x / b)
else if (f <= (-1.65d-307)) then
tmp = t_0 + ((f / b) * ((-1.0d0) / f))
else if (f <= 2.35d-138) then
tmp = ((f * t_1) - x) / b
else if (f <= 0.0235d0) then
tmp = t_0 + ((-1.0d0) / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -0.235) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.5e-145) {
tmp = ((0.3333333333333333 * (B * x)) + (t_1 * (F / B))) - (x / B);
} else if (F <= -1.65e-307) {
tmp = t_0 + ((F / B) * (-1.0 / F));
} else if (F <= 2.35e-138) {
tmp = ((F * t_1) - x) / B;
} else if (F <= 0.0235) {
tmp = t_0 + (-1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) tmp = 0 if F <= -0.235: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.5e-145: tmp = ((0.3333333333333333 * (B * x)) + (t_1 * (F / B))) - (x / B) elif F <= -1.65e-307: tmp = t_0 + ((F / B) * (-1.0 / F)) elif F <= 2.35e-138: tmp = ((F * t_1) - x) / B elif F <= 0.0235: tmp = t_0 + (-1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) tmp = 0.0 if (F <= -0.235) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.5e-145) tmp = Float64(Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(t_1 * Float64(F / B))) - Float64(x / B)); elseif (F <= -1.65e-307) tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 2.35e-138) tmp = Float64(Float64(Float64(F * t_1) - x) / B); elseif (F <= 0.0235) tmp = Float64(t_0 + Float64(-1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = sqrt((1.0 / (2.0 + (x * 2.0)))); tmp = 0.0; if (F <= -0.235) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.5e-145) tmp = ((0.3333333333333333 * (B * x)) + (t_1 * (F / B))) - (x / B); elseif (F <= -1.65e-307) tmp = t_0 + ((F / B) * (-1.0 / F)); elseif (F <= 2.35e-138) tmp = ((F * t_1) - x) / B; elseif (F <= 0.0235) tmp = t_0 + (-1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -0.235], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.5e-145], N[(N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.65e-307], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e-138], N[(N[(N[(F * t$95$1), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0235], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{if}\;F \leq -0.235:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-145}:\\
\;\;\;\;\left(0.3333333333333333 \cdot \left(B \cdot x\right) + t_1 \cdot \frac{F}{B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-307}:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-138}:\\
\;\;\;\;\frac{F \cdot t_1 - x}{B}\\
\mathbf{elif}\;F \leq 0.0235:\\
\;\;\;\;t_0 + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.23499999999999999Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.23499999999999999 < F < -4.5000000000000001e-145Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 65.9%
Taylor expanded in B around 0 49.9%
if -4.5000000000000001e-145 < F < -1.65e-307Initial program 99.5%
Taylor expanded in F around -inf 31.1%
Taylor expanded in B around 0 60.5%
if -1.65e-307 < F < 2.3500000000000001e-138Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.7%
associate-*r/99.7%
*-commutative99.7%
Simplified99.9%
Taylor expanded in F around 0 99.9%
Taylor expanded in B around 0 74.1%
if 2.3500000000000001e-138 < F < 0.0235Initial program 99.5%
Taylor expanded in F around -inf 40.2%
Taylor expanded in B around 0 54.3%
if 0.0235 < F Initial program 47.4%
Taylor expanded in B around 0 32.0%
Taylor expanded in F around inf 83.4%
Final simplification71.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= F -0.235)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.4e-109)
(-
(+ (* 0.3333333333333333 (* B x)) (* (sqrt (/ 1.0 t_0)) (/ F B)))
(/ x B))
(+ (* x (/ -1.0 (tan B))) (/ F (* B (+ F (* 0.5 (/ t_0 F))))))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.235) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.4e-109) {
tmp = ((0.3333333333333333 * (B * x)) + (sqrt((1.0 / t_0)) * (F / B))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * (t_0 / F)))));
}
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 = 2.0d0 + (x * 2.0d0)
if (f <= (-0.235d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.4d-109)) then
tmp = ((0.3333333333333333d0 * (b * x)) + (sqrt((1.0d0 / t_0)) * (f / b))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * (f + (0.5d0 * (t_0 / f)))))
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 tmp;
if (F <= -0.235) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.4e-109) {
tmp = ((0.3333333333333333 * (B * x)) + (Math.sqrt((1.0 / t_0)) * (F / B))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (F + (0.5 * (t_0 / F)))));
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) tmp = 0 if F <= -0.235: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.4e-109: tmp = ((0.3333333333333333 * (B * x)) + (math.sqrt((1.0 / t_0)) * (F / B))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (F + (0.5 * (t_0 / F))))) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -0.235) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.4e-109) tmp = Float64(Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(sqrt(Float64(1.0 / t_0)) * Float64(F / B))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(t_0 / F)))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -0.235) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.4e-109) tmp = ((0.3333333333333333 * (B * x)) + (sqrt((1.0 / t_0)) * (F / B))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * (t_0 / F))))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.235], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.4e-109], N[(N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(F + N[(0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -0.235:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.4 \cdot 10^{-109}:\\
\;\;\;\;\left(0.3333333333333333 \cdot \left(B \cdot x\right) + \sqrt{\frac{1}{t_0}} \cdot \frac{F}{B}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{t_0}{F}\right)}\\
\end{array}
\end{array}
if F < -0.23499999999999999Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.23499999999999999 < F < -3.40000000000000012e-109Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 68.0%
Taylor expanded in B around 0 53.2%
if -3.40000000000000012e-109 < F Initial program 75.9%
associate-*l/85.2%
+-commutative85.2%
*-commutative85.2%
fma-udef85.2%
fma-def85.2%
metadata-eval85.2%
metadata-eval85.2%
associate-/l*85.1%
fma-def85.1%
fma-udef85.1%
*-commutative85.1%
fma-def85.1%
fma-def85.1%
Applied egg-rr85.1%
clear-num85.1%
inv-pow85.1%
div-inv85.1%
pow-flip85.2%
metadata-eval85.2%
pow1/285.2%
Applied egg-rr85.2%
unpow-185.2%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in F around inf 86.9%
Taylor expanded in B around 0 78.8%
Final simplification76.6%
(FPCore (F B x)
:precision binary64
(if (<= F -430.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.7e-110)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(+
(* x (/ -1.0 (tan B)))
(/ F (* B (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -430.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.7e-110) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
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 <= (-430.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.7d-110)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -430.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.7e-110) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -430.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.7e-110: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -430.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.7e-110) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -430.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.7e-110) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (F / (B * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -430.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.7e-110], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -430:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.7 \cdot 10^{-110}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\end{array}
\end{array}
if F < -430Initial program 56.2%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 80.6%
if -430 < F < -2.6999999999999998e-110Initial program 99.5%
Taylor expanded in B around 0 82.6%
Taylor expanded in B around 0 55.3%
if -2.6999999999999998e-110 < F Initial program 75.9%
associate-*l/85.2%
+-commutative85.2%
*-commutative85.2%
fma-udef85.2%
fma-def85.2%
metadata-eval85.2%
metadata-eval85.2%
associate-/l*85.1%
fma-def85.1%
fma-udef85.1%
*-commutative85.1%
fma-def85.1%
fma-def85.1%
Applied egg-rr85.1%
clear-num85.1%
inv-pow85.1%
div-inv85.1%
pow-flip85.2%
metadata-eval85.2%
pow1/285.2%
Applied egg-rr85.2%
unpow-185.2%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in F around inf 86.9%
Taylor expanded in B around 0 78.8%
Final simplification76.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -0.06)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9.5e-147)
t_0
(if (<= F -3.8e-308)
t_1
(if (<= F 1.1e-138)
t_0
(if (<= F 0.49) t_1 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.06) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9.5e-147) {
tmp = t_0;
} else if (F <= -3.8e-308) {
tmp = t_1;
} else if (F <= 1.1e-138) {
tmp = t_0;
} else if (F <= 0.49) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-0.06d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9.5d-147)) then
tmp = t_0
else if (f <= (-3.8d-308)) then
tmp = t_1
else if (f <= 1.1d-138) then
tmp = t_0
else if (f <= 0.49d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.06) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9.5e-147) {
tmp = t_0;
} else if (F <= -3.8e-308) {
tmp = t_1;
} else if (F <= 1.1e-138) {
tmp = t_0;
} else if (F <= 0.49) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -0.06: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9.5e-147: tmp = t_0 elif F <= -3.8e-308: tmp = t_1 elif F <= 1.1e-138: tmp = t_0 elif F <= 0.49: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -0.06) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9.5e-147) tmp = t_0; elseif (F <= -3.8e-308) tmp = t_1; elseif (F <= 1.1e-138) tmp = t_0; elseif (F <= 0.49) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -0.06) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9.5e-147) tmp = t_0; elseif (F <= -3.8e-308) tmp = t_1; elseif (F <= 1.1e-138) tmp = t_0; elseif (F <= 0.49) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.06], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-147], t$95$0, If[LessEqual[F, -3.8e-308], t$95$1, If[LessEqual[F, 1.1e-138], t$95$0, If[LessEqual[F, 0.49], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -0.06:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-147}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-138}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 0.49:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.059999999999999998Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.059999999999999998 < F < -9.49999999999999986e-147 or -3.79999999999999975e-308 < F < 1.0999999999999999e-138Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 60.0%
if -9.49999999999999986e-147 < F < -3.79999999999999975e-308 or 1.0999999999999999e-138 < F < 0.48999999999999999Initial program 99.5%
Taylor expanded in F around -inf 35.3%
Taylor expanded in B around 0 56.2%
if 0.48999999999999999 < F Initial program 47.4%
Taylor expanded in B around 0 32.0%
Taylor expanded in F around inf 83.4%
Final simplification71.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -0.22)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.15e-145)
t_0
(if (<= F -2.2e-308)
(+ t_1 (* (/ F B) (/ -1.0 F)))
(if (<= F 1.3e-138)
t_0
(if (<= F 0.0275)
(+ t_1 (/ -1.0 B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.22) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.15e-145) {
tmp = t_0;
} else if (F <= -2.2e-308) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 1.3e-138) {
tmp = t_0;
} else if (F <= 0.0275) {
tmp = t_1 + (-1.0 / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-0.22d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.15d-145)) then
tmp = t_0
else if (f <= (-2.2d-308)) then
tmp = t_1 + ((f / b) * ((-1.0d0) / f))
else if (f <= 1.3d-138) then
tmp = t_0
else if (f <= 0.0275d0) then
tmp = t_1 + ((-1.0d0) / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.22) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.15e-145) {
tmp = t_0;
} else if (F <= -2.2e-308) {
tmp = t_1 + ((F / B) * (-1.0 / F));
} else if (F <= 1.3e-138) {
tmp = t_0;
} else if (F <= 0.0275) {
tmp = t_1 + (-1.0 / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.22: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.15e-145: tmp = t_0 elif F <= -2.2e-308: tmp = t_1 + ((F / B) * (-1.0 / F)) elif F <= 1.3e-138: tmp = t_0 elif F <= 0.0275: tmp = t_1 + (-1.0 / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.22) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.15e-145) tmp = t_0; elseif (F <= -2.2e-308) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 1.3e-138) tmp = t_0; elseif (F <= 0.0275) tmp = Float64(t_1 + Float64(-1.0 / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.22) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.15e-145) tmp = t_0; elseif (F <= -2.2e-308) tmp = t_1 + ((F / B) * (-1.0 / F)); elseif (F <= 1.3e-138) tmp = t_0; elseif (F <= 0.0275) tmp = t_1 + (-1.0 / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-145], t$95$0, If[LessEqual[F, -2.2e-308], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-138], t$95$0, If[LessEqual[F, 0.0275], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.22:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-145}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-308}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-138}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 0.0275:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.220000000000000001Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.220000000000000001 < F < -1.15000000000000004e-145 or -2.2000000000000002e-308 < F < 1.3e-138Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 60.0%
if -1.15000000000000004e-145 < F < -2.2000000000000002e-308Initial program 99.5%
Taylor expanded in F around -inf 31.1%
Taylor expanded in B around 0 60.5%
if 1.3e-138 < F < 0.0275000000000000001Initial program 99.5%
Taylor expanded in F around -inf 40.2%
Taylor expanded in B around 0 54.3%
if 0.0275000000000000001 < F Initial program 47.4%
Taylor expanded in B around 0 32.0%
Taylor expanded in F around inf 83.4%
Final simplification71.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -1.3e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.08e-29)
(/ (sqrt 0.5) (/ B F))
(if (<= F -5.2e-305)
t_0
(if (<= F 1.36e-139)
(/ (- x) B)
(if (<= F 1.28e-5) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -1.3e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.08e-29) {
tmp = sqrt(0.5) / (B / F);
} else if (F <= -5.2e-305) {
tmp = t_0;
} else if (F <= 1.36e-139) {
tmp = -x / B;
} else if (F <= 1.28e-5) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-1.3d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.08d-29)) then
tmp = sqrt(0.5d0) / (b / f)
else if (f <= (-5.2d-305)) then
tmp = t_0
else if (f <= 1.36d-139) then
tmp = -x / b
else if (f <= 1.28d-5) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -1.3e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.08e-29) {
tmp = Math.sqrt(0.5) / (B / F);
} else if (F <= -5.2e-305) {
tmp = t_0;
} else if (F <= 1.36e-139) {
tmp = -x / B;
} else if (F <= 1.28e-5) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -1.3e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.08e-29: tmp = math.sqrt(0.5) / (B / F) elif F <= -5.2e-305: tmp = t_0 elif F <= 1.36e-139: tmp = -x / B elif F <= 1.28e-5: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -1.3e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.08e-29) tmp = Float64(sqrt(0.5) / Float64(B / F)); elseif (F <= -5.2e-305) tmp = t_0; elseif (F <= 1.36e-139) tmp = Float64(Float64(-x) / B); elseif (F <= 1.28e-5) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -1.3e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.08e-29) tmp = sqrt(0.5) / (B / F); elseif (F <= -5.2e-305) tmp = t_0; elseif (F <= 1.36e-139) tmp = -x / B; elseif (F <= 1.28e-5) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.3e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.08e-29], N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-305], t$95$0, If[LessEqual[F, 1.36e-139], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 1.28e-5], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -1.3 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.08 \cdot 10^{-29}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-305}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.36 \cdot 10^{-139}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 1.28 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.29999999999999992e-5Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -1.29999999999999992e-5 < F < -1.07999999999999995e-29Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.2%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in F around 0 98.1%
Taylor expanded in x around 0 92.4%
Taylor expanded in B around 0 50.1%
associate-/l*50.1%
Simplified50.1%
if -1.07999999999999995e-29 < F < -5.2000000000000003e-305 or 1.36000000000000003e-139 < F < 1.2799999999999999e-5Initial program 99.5%
Taylor expanded in F around -inf 35.2%
Taylor expanded in B around 0 51.4%
if -5.2000000000000003e-305 < F < 1.36000000000000003e-139Initial program 99.7%
Taylor expanded in F around -inf 30.9%
Taylor expanded in B around 0 27.9%
associate-*r/27.9%
distribute-lft-in27.9%
metadata-eval27.9%
neg-mul-127.9%
Simplified27.9%
Taylor expanded in x around inf 63.6%
associate-*r/63.6%
mul-1-neg63.6%
Simplified63.6%
if 1.2799999999999999e-5 < F Initial program 47.4%
Taylor expanded in B around 0 32.0%
Taylor expanded in F around inf 83.4%
Final simplification69.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0019)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1e-110)
(/ (* F (sqrt 0.5)) B)
(if (<= F 1.4e-30) (/ (- x) B) (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0019) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1e-110) {
tmp = (F * sqrt(0.5)) / B;
} else if (F <= 1.4e-30) {
tmp = -x / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.0019d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1d-110)) then
tmp = (f * sqrt(0.5d0)) / b
else if (f <= 1.4d-30) then
tmp = -x / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0019) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1e-110) {
tmp = (F * Math.sqrt(0.5)) / B;
} else if (F <= 1.4e-30) {
tmp = -x / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0019: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1e-110: tmp = (F * math.sqrt(0.5)) / B elif F <= 1.4e-30: tmp = -x / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0019) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1e-110) tmp = Float64(Float64(F * sqrt(0.5)) / B); elseif (F <= 1.4e-30) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0019) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1e-110) tmp = (F * sqrt(0.5)) / B; elseif (F <= 1.4e-30) tmp = -x / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0019], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1e-110], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.4e-30], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0019:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1 \cdot 10^{-110}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-30}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0019Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.0019 < F < -1.0000000000000001e-110Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 67.5%
Taylor expanded in B around 0 40.3%
if -1.0000000000000001e-110 < F < 1.39999999999999994e-30Initial program 99.5%
Taylor expanded in F around -inf 30.9%
Taylor expanded in B around 0 16.8%
associate-*r/16.8%
distribute-lft-in16.8%
metadata-eval16.8%
neg-mul-116.8%
Simplified16.8%
Taylor expanded in x around inf 38.9%
associate-*r/38.9%
mul-1-neg38.9%
Simplified38.9%
if 1.39999999999999994e-30 < F Initial program 51.9%
Taylor expanded in B around 0 35.4%
Taylor expanded in F around inf 80.2%
Final simplification63.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.034)
(/ -1.0 (sin B))
(if (<= F -6e-114)
(/ F (/ B (sqrt 0.5)))
(if (<= F 52000000000.0) (/ (- x) B) (fabs (/ (+ -1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.034) {
tmp = -1.0 / sin(B);
} else if (F <= -6e-114) {
tmp = F / (B / sqrt(0.5));
} else if (F <= 52000000000.0) {
tmp = -x / B;
} else {
tmp = fabs(((-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 <= (-0.034d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-6d-114)) then
tmp = f / (b / sqrt(0.5d0))
else if (f <= 52000000000.0d0) then
tmp = -x / b
else
tmp = abs((((-1.0d0) + x) / b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.034) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -6e-114) {
tmp = F / (B / Math.sqrt(0.5));
} else if (F <= 52000000000.0) {
tmp = -x / B;
} else {
tmp = Math.abs(((-1.0 + x) / B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.034: tmp = -1.0 / math.sin(B) elif F <= -6e-114: tmp = F / (B / math.sqrt(0.5)) elif F <= 52000000000.0: tmp = -x / B else: tmp = math.fabs(((-1.0 + x) / B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.034) tmp = Float64(-1.0 / sin(B)); elseif (F <= -6e-114) tmp = Float64(F / Float64(B / sqrt(0.5))); elseif (F <= 52000000000.0) tmp = Float64(Float64(-x) / B); else tmp = abs(Float64(Float64(-1.0 + x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.034) tmp = -1.0 / sin(B); elseif (F <= -6e-114) tmp = F / (B / sqrt(0.5)); elseif (F <= 52000000000.0) tmp = -x / B; else tmp = abs(((-1.0 + x) / B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.034], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6e-114], N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 52000000000.0], N[((-x) / B), $MachinePrecision], N[Abs[N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.034:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -6 \cdot 10^{-114}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 52000000000:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1 + x}{B}\right|\\
\end{array}
\end{array}
if F < -0.034000000000000002Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in x around 0 60.9%
if -0.034000000000000002 < F < -6.0000000000000003e-114Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 67.5%
Taylor expanded in B around 0 40.3%
*-commutative40.3%
associate-/l*40.2%
Simplified40.2%
if -6.0000000000000003e-114 < F < 5.2e10Initial program 98.4%
Taylor expanded in F around -inf 33.9%
Taylor expanded in B around 0 20.4%
associate-*r/20.4%
distribute-lft-in20.4%
metadata-eval20.4%
neg-mul-120.4%
Simplified20.4%
Taylor expanded in x around inf 39.9%
associate-*r/39.9%
mul-1-neg39.9%
Simplified39.9%
if 5.2e10 < F Initial program 45.8%
Taylor expanded in F around -inf 40.7%
Taylor expanded in B around 0 25.6%
associate-*r/25.6%
distribute-lft-in25.6%
metadata-eval25.6%
neg-mul-125.6%
Simplified25.6%
add-sqr-sqrt11.7%
sqrt-unprod18.3%
pow218.3%
+-commutative18.3%
add-sqr-sqrt8.4%
sqrt-unprod18.4%
sqr-neg18.4%
sqrt-unprod9.9%
add-sqr-sqrt18.3%
Applied egg-rr18.3%
unpow218.3%
rem-sqrt-square39.7%
Simplified39.7%
Final simplification45.5%
(FPCore (F B x)
:precision binary64
(if (<= F -0.112)
(/ -1.0 (sin B))
(if (<= F -1.35e-110)
(/ (* F (sqrt 0.5)) B)
(if (<= F 39000000000.0) (/ (- x) B) (fabs (/ (+ -1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.112) {
tmp = -1.0 / sin(B);
} else if (F <= -1.35e-110) {
tmp = (F * sqrt(0.5)) / B;
} else if (F <= 39000000000.0) {
tmp = -x / B;
} else {
tmp = fabs(((-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 <= (-0.112d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-1.35d-110)) then
tmp = (f * sqrt(0.5d0)) / b
else if (f <= 39000000000.0d0) then
tmp = -x / b
else
tmp = abs((((-1.0d0) + x) / b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.112) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -1.35e-110) {
tmp = (F * Math.sqrt(0.5)) / B;
} else if (F <= 39000000000.0) {
tmp = -x / B;
} else {
tmp = Math.abs(((-1.0 + x) / B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.112: tmp = -1.0 / math.sin(B) elif F <= -1.35e-110: tmp = (F * math.sqrt(0.5)) / B elif F <= 39000000000.0: tmp = -x / B else: tmp = math.fabs(((-1.0 + x) / B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.112) tmp = Float64(-1.0 / sin(B)); elseif (F <= -1.35e-110) tmp = Float64(Float64(F * sqrt(0.5)) / B); elseif (F <= 39000000000.0) tmp = Float64(Float64(-x) / B); else tmp = abs(Float64(Float64(-1.0 + x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.112) tmp = -1.0 / sin(B); elseif (F <= -1.35e-110) tmp = (F * sqrt(0.5)) / B; elseif (F <= 39000000000.0) tmp = -x / B; else tmp = abs(((-1.0 + x) / B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.112], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.35e-110], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 39000000000.0], N[((-x) / B), $MachinePrecision], N[Abs[N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.112:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{-110}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 39000000000:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1 + x}{B}\right|\\
\end{array}
\end{array}
if F < -0.112000000000000002Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in x around 0 60.9%
if -0.112000000000000002 < F < -1.3499999999999999e-110Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 67.5%
Taylor expanded in B around 0 40.3%
if -1.3499999999999999e-110 < F < 3.9e10Initial program 98.4%
Taylor expanded in F around -inf 33.9%
Taylor expanded in B around 0 20.4%
associate-*r/20.4%
distribute-lft-in20.4%
metadata-eval20.4%
neg-mul-120.4%
Simplified20.4%
Taylor expanded in x around inf 39.9%
associate-*r/39.9%
mul-1-neg39.9%
Simplified39.9%
if 3.9e10 < F Initial program 45.8%
Taylor expanded in F around -inf 40.7%
Taylor expanded in B around 0 25.6%
associate-*r/25.6%
distribute-lft-in25.6%
metadata-eval25.6%
neg-mul-125.6%
Simplified25.6%
add-sqr-sqrt11.7%
sqrt-unprod18.3%
pow218.3%
+-commutative18.3%
add-sqr-sqrt8.4%
sqrt-unprod18.4%
sqr-neg18.4%
sqrt-unprod9.9%
add-sqr-sqrt18.3%
Applied egg-rr18.3%
unpow218.3%
rem-sqrt-square39.7%
Simplified39.7%
Final simplification45.5%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0034)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1e-110)
(/ (* F (sqrt 0.5)) B)
(if (<= F 16500000000.0) (/ (- x) B) (fabs (/ (+ -1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0034) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1e-110) {
tmp = (F * sqrt(0.5)) / B;
} else if (F <= 16500000000.0) {
tmp = -x / B;
} else {
tmp = fabs(((-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 <= (-0.0034d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1d-110)) then
tmp = (f * sqrt(0.5d0)) / b
else if (f <= 16500000000.0d0) then
tmp = -x / b
else
tmp = abs((((-1.0d0) + x) / b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0034) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1e-110) {
tmp = (F * Math.sqrt(0.5)) / B;
} else if (F <= 16500000000.0) {
tmp = -x / B;
} else {
tmp = Math.abs(((-1.0 + x) / B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0034: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1e-110: tmp = (F * math.sqrt(0.5)) / B elif F <= 16500000000.0: tmp = -x / B else: tmp = math.fabs(((-1.0 + x) / B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0034) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1e-110) tmp = Float64(Float64(F * sqrt(0.5)) / B); elseif (F <= 16500000000.0) tmp = Float64(Float64(-x) / B); else tmp = abs(Float64(Float64(-1.0 + x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0034) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1e-110) tmp = (F * sqrt(0.5)) / B; elseif (F <= 16500000000.0) tmp = -x / B; else tmp = abs(((-1.0 + x) / B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0034], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1e-110], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 16500000000.0], N[((-x) / B), $MachinePrecision], N[Abs[N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0034:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1 \cdot 10^{-110}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 16500000000:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1 + x}{B}\right|\\
\end{array}
\end{array}
if F < -0.00339999999999999981Initial program 56.9%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 79.9%
if -0.00339999999999999981 < F < -1.0000000000000001e-110Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 67.5%
Taylor expanded in B around 0 40.3%
if -1.0000000000000001e-110 < F < 1.65e10Initial program 98.4%
Taylor expanded in F around -inf 33.9%
Taylor expanded in B around 0 20.4%
associate-*r/20.4%
distribute-lft-in20.4%
metadata-eval20.4%
neg-mul-120.4%
Simplified20.4%
Taylor expanded in x around inf 39.9%
associate-*r/39.9%
mul-1-neg39.9%
Simplified39.9%
if 1.65e10 < F Initial program 45.8%
Taylor expanded in F around -inf 40.7%
Taylor expanded in B around 0 25.6%
associate-*r/25.6%
distribute-lft-in25.6%
metadata-eval25.6%
neg-mul-125.6%
Simplified25.6%
add-sqr-sqrt11.7%
sqrt-unprod18.3%
pow218.3%
+-commutative18.3%
add-sqr-sqrt8.4%
sqrt-unprod18.4%
sqr-neg18.4%
sqrt-unprod9.9%
add-sqr-sqrt18.3%
Applied egg-rr18.3%
unpow218.3%
rem-sqrt-square39.7%
Simplified39.7%
Final simplification50.5%
(FPCore (F B x) :precision binary64 (if (<= F -5.2e-47) (/ -1.0 (sin B)) (if (<= F 7400000000.0) (/ (- x) B) (fabs (/ (+ -1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e-47) {
tmp = -1.0 / sin(B);
} else if (F <= 7400000000.0) {
tmp = -x / B;
} else {
tmp = fabs(((-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.2d-47)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 7400000000.0d0) then
tmp = -x / b
else
tmp = abs((((-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.2e-47) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 7400000000.0) {
tmp = -x / B;
} else {
tmp = Math.abs(((-1.0 + x) / B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2e-47: tmp = -1.0 / math.sin(B) elif F <= 7400000000.0: tmp = -x / B else: tmp = math.fabs(((-1.0 + x) / B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2e-47) tmp = Float64(-1.0 / sin(B)); elseif (F <= 7400000000.0) tmp = Float64(Float64(-x) / B); else tmp = abs(Float64(Float64(-1.0 + x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.2e-47) tmp = -1.0 / sin(B); elseif (F <= 7400000000.0) tmp = -x / B; else tmp = abs(((-1.0 + x) / B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2e-47], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7400000000.0], N[((-x) / B), $MachinePrecision], N[Abs[N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 7400000000:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-1 + x}{B}\right|\\
\end{array}
\end{array}
if F < -5.2e-47Initial program 63.3%
Taylor expanded in F around -inf 85.9%
Taylor expanded in B around 0 56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in x around 0 53.1%
if -5.2e-47 < F < 7.4e9Initial program 98.6%
Taylor expanded in F around -inf 34.5%
Taylor expanded in B around 0 19.3%
associate-*r/19.3%
distribute-lft-in19.3%
metadata-eval19.3%
neg-mul-119.3%
Simplified19.3%
Taylor expanded in x around inf 37.0%
associate-*r/37.0%
mul-1-neg37.0%
Simplified37.0%
if 7.4e9 < F Initial program 45.8%
Taylor expanded in F around -inf 40.7%
Taylor expanded in B around 0 25.6%
associate-*r/25.6%
distribute-lft-in25.6%
metadata-eval25.6%
neg-mul-125.6%
Simplified25.6%
add-sqr-sqrt11.7%
sqrt-unprod18.3%
pow218.3%
+-commutative18.3%
add-sqr-sqrt8.4%
sqrt-unprod18.4%
sqr-neg18.4%
sqrt-unprod9.9%
add-sqr-sqrt18.3%
Applied egg-rr18.3%
unpow218.3%
rem-sqrt-square39.7%
Simplified39.7%
Final simplification42.8%
(FPCore (F B x) :precision binary64 (if (<= F -5.2e-47) (/ -1.0 (sin B)) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e-47) {
tmp = -1.0 / sin(B);
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.2d-47)) then
tmp = (-1.0d0) / sin(b)
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e-47) {
tmp = -1.0 / Math.sin(B);
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2e-47: tmp = -1.0 / math.sin(B) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2e-47) tmp = Float64(-1.0 / sin(B)); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.2e-47) tmp = -1.0 / sin(B); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2e-47], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -5.2e-47Initial program 63.3%
Taylor expanded in F around -inf 85.9%
Taylor expanded in B around 0 56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in x around 0 53.1%
if -5.2e-47 < F Initial program 77.6%
Taylor expanded in F around -inf 37.0%
Taylor expanded in B around 0 21.8%
associate-*r/21.8%
distribute-lft-in21.8%
metadata-eval21.8%
neg-mul-121.8%
Simplified21.8%
Taylor expanded in x around inf 32.9%
associate-*r/32.9%
mul-1-neg32.9%
Simplified32.9%
Final simplification39.2%
(FPCore (F B x) :precision binary64 (if (<= F -5e-47) (+ (* B -0.16666666666666666) (/ (- -1.0 x) B)) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e-47) {
tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B);
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5d-47)) then
tmp = (b * (-0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5e-47) {
tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B);
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e-47: tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e-47) tmp = Float64(Float64(B * -0.16666666666666666) + Float64(Float64(-1.0 - x) / B)); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e-47) tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e-47], N[(N[(B * -0.16666666666666666), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-47}:\\
\;\;\;\;B \cdot -0.16666666666666666 + \frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -5.00000000000000011e-47Initial program 63.3%
Taylor expanded in F around -inf 85.9%
Taylor expanded in B around 0 69.3%
Taylor expanded in B around 0 43.7%
+-commutative43.7%
mul-1-neg43.7%
unsub-neg43.7%
*-commutative43.7%
+-commutative43.7%
Simplified43.7%
if -5.00000000000000011e-47 < F Initial program 77.6%
Taylor expanded in F around -inf 37.0%
Taylor expanded in B around 0 21.8%
associate-*r/21.8%
distribute-lft-in21.8%
metadata-eval21.8%
neg-mul-121.8%
Simplified21.8%
Taylor expanded in x around inf 32.9%
associate-*r/32.9%
mul-1-neg32.9%
Simplified32.9%
Final simplification36.3%
(FPCore (F B x) :precision binary64 (if (<= F -4.1e-47) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e-47) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.1d-47)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e-47) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.1e-47: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.1e-47) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.1e-47) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.1e-47], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.1 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -4.10000000000000002e-47Initial program 63.3%
Taylor expanded in F around -inf 85.9%
Taylor expanded in B around 0 43.7%
associate-*r/43.7%
distribute-lft-in43.7%
metadata-eval43.7%
neg-mul-143.7%
Simplified43.7%
if -4.10000000000000002e-47 < F Initial program 77.6%
Taylor expanded in F around -inf 37.0%
Taylor expanded in B around 0 21.8%
associate-*r/21.8%
distribute-lft-in21.8%
metadata-eval21.8%
neg-mul-121.8%
Simplified21.8%
Taylor expanded in x around inf 32.9%
associate-*r/32.9%
mul-1-neg32.9%
Simplified32.9%
Final simplification36.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.85e+109) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e+109) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.85d+109)) then
tmp = (-1.0d0) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e+109) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.85e+109: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.85e+109) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.85e+109) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.85e+109], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.85 \cdot 10^{+109}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.8500000000000001e109Initial program 38.3%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 54.6%
associate-*r/54.6%
distribute-lft-in54.6%
metadata-eval54.6%
neg-mul-154.6%
Simplified54.6%
Taylor expanded in x around 0 37.0%
if -1.8500000000000001e109 < F Initial program 80.7%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 23.0%
associate-*r/23.0%
distribute-lft-in23.0%
metadata-eval23.0%
neg-mul-123.0%
Simplified23.0%
Taylor expanded in x around inf 30.4%
associate-*r/30.4%
mul-1-neg30.4%
Simplified30.4%
Final simplification31.6%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 73.1%
Taylor expanded in F around -inf 52.3%
Taylor expanded in B around 0 28.7%
associate-*r/28.7%
distribute-lft-in28.7%
metadata-eval28.7%
neg-mul-128.7%
Simplified28.7%
Taylor expanded in x around 0 11.0%
Final simplification11.0%
herbie shell --seed 2023250
(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))))))