
(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 24 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 -7.5e+28)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 200000000000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.5e+28) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 200000000000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.5e+28) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 200000000000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e+28], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000000.0], 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 200000000000:\\
\;\;\;\;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}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7.4999999999999998e28Initial program 63.8%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.7%
Applied egg-rr99.7%
if -7.4999999999999998e28 < F < 2e11Initial program 99.5%
Simplified99.7%
if 2e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -2e+29)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 200000000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e+29) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 200000000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(B));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2d+29)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 200000000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2e+29) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 200000000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e+29: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 200000000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e+29) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 200000000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2e+29) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 200000000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e+29], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000000.0], 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[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 200000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.99999999999999983e29Initial program 63.8%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.7%
Applied egg-rr99.7%
if -1.99999999999999983e29 < F < 2e11Initial program 99.5%
Taylor expanded in x around 0 99.6%
if 2e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8e+28)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 200000000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8e+28) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 200000000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8e+28) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 200000000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e+28], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 200000000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7.99999999999999967e28Initial program 63.8%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.7%
Applied egg-rr99.7%
if -7.99999999999999967e28 < F < 2e11Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
if 2e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -5e+69)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.55e+150)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) (/ x (tan B)))
(+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e+69) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.55e+150) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - (x / tan(B));
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -5e+69) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.55e+150) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -5e+69], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e+150], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{+150}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -5.00000000000000036e69Initial program 57.6%
Taylor expanded in F around -inf 99.6%
div-inv99.6%
clear-num99.7%
Applied egg-rr99.7%
if -5.00000000000000036e69 < F < 1.55000000000000007e150Initial program 97.6%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.6%
clear-num99.6%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/r/99.5%
times-frac99.6%
*-lft-identity99.6%
Simplified99.6%
if 1.55000000000000007e150 < F Initial program 26.8%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1e+21)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 185000000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e+21) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 185000000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1d+21)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 185000000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1e+21) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 185000000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e+21: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 185000000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e+21) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 185000000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1e+21) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 185000000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e+21], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 185000000000.0], 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 * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 185000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1e21Initial program 65.2%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.8%
Applied egg-rr99.8%
if -1e21 < F < 1.85e11Initial program 99.5%
if 1.85e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (/ (tan B) x))))
(if (<= F -2e+29)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 185000000000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / (tan(B) / x);
double tmp;
if (F <= -2e+29) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 185000000000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (-1.0d0) / (tan(b) / x)
if (f <= (-2d+29)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 185000000000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -1.0 / (Math.tan(B) / x);
double tmp;
if (F <= -2e+29) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 185000000000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / (math.tan(B) / x) tmp = 0 if F <= -2e+29: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 185000000000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(-1.0 / Float64(tan(B) / x)) tmp = 0.0 if (F <= -2e+29) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 185000000000.0) 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(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / (tan(B) / x); tmp = 0.0; if (F <= -2e+29) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 185000000000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+29], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 185000000000.0], 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[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+29}:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 185000000000:\\
\;\;\;\;t\_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.99999999999999983e29Initial program 63.8%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.7%
Applied egg-rr99.7%
if -1.99999999999999983e29 < F < 1.85e11Initial program 99.5%
div-inv41.7%
clear-num41.6%
Applied egg-rr99.5%
if 1.85e11 < F Initial program 50.9%
Simplified70.1%
Taylor expanded in x around 0 70.2%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 65.7%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.7%
Applied egg-rr99.7%
if -1.44999999999999996 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.7%
if 1.3999999999999999 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-undefine70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.4)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.4) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.4d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.4) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.4: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.4) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.4) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 65.7%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.7%
Applied egg-rr99.7%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.7%
clear-num98.8%
un-div-inv98.8%
Applied egg-rr98.8%
if 1.3999999999999999 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-undefine70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -70000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F -8.5e-67)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.23)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -70000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= -8.5e-67) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.23) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-70000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= (-8.5d-67)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.23d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -70000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= -8.5e-67) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.23) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -70000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= -8.5e-67: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.23: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -70000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= -8.5e-67) 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.23) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -70000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= -8.5e-67) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.23) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -70000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.5e-67], 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.23], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -70000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-67}:\\
\;\;\;\;\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.23:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7e7Initial program 65.2%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.8%
Applied egg-rr99.8%
if -7e7 < F < -8.49999999999999993e-67Initial program 99.3%
Taylor expanded in B around 0 85.8%
if -8.49999999999999993e-67 < F < 0.23000000000000001Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 94.5%
if 0.23000000000000001 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-undefine70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification97.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e-9)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F -4.2e-67)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 0.395)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3e-9) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= -4.2e-67) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.395) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3d-9)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= (-4.2d-67)) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 0.395d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3e-9) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= -4.2e-67) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.395) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3e-9: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= -4.2e-67: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 0.395: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3e-9) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= -4.2e-67) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 0.395) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3e-9) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= -4.2e-67) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 0.395) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e-9], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.2e-67], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.395], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-67}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.395:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.99999999999999998e-9Initial program 66.9%
Taylor expanded in F around -inf 97.5%
div-inv97.6%
clear-num97.6%
Applied egg-rr97.6%
if -2.99999999999999998e-9 < F < -4.2000000000000003e-67Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 89.7%
if -4.2000000000000003e-67 < F < 0.39500000000000002Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 94.5%
if 0.39500000000000002 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-undefine70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification96.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.31)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.08) (- (* F (/ (sqrt 0.5) B)) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.31) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.08) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.31d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.08d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.31) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.08) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.31: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.08: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.31) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.08) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.31) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.08) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.08], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.31:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.08:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.309999999999999998Initial program 66.1%
Simplified80.1%
Taylor expanded in x around 0 80.1%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-undefine80.1%
Simplified80.1%
Taylor expanded in F around -inf 98.6%
if -0.309999999999999998 < F < 0.0800000000000000017Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 89.2%
if 0.0800000000000000017 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-undefine70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification94.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.21)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 0.98) (- (* F (/ (sqrt 0.5) B)) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 0.98) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.21d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 0.98d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 0.98) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.21: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 0.98: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.21) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 0.98) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.21) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 0.98) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.21], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.98], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.21:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.98:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.209999999999999992Initial program 66.1%
Taylor expanded in F around -inf 98.6%
div-inv98.6%
clear-num98.7%
Applied egg-rr98.7%
if -0.209999999999999992 < F < 0.97999999999999998Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 89.2%
if 0.97999999999999998 < F Initial program 51.6%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
+-commutative70.5%
unpow270.5%
fma-undefine70.5%
Simplified70.5%
Taylor expanded in F around inf 99.7%
Final simplification94.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.95e-18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.9e-13) (/ x (- (tan B))) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.95e-18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.9e-13) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.95d-18)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.9d-13) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.95e-18) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.9e-13) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.95e-18: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.9e-13: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.95e-18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.9e-13) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.95e-18) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.9e-13) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.95e-18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.9e-13], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.95 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.95000000000000002e-18Initial program 68.0%
Simplified81.2%
Taylor expanded in x around 0 81.2%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
Taylor expanded in F around -inf 94.5%
if -1.95000000000000002e-18 < F < 2.8999999999999998e-13Initial program 99.5%
Taylor expanded in F around -inf 41.4%
Taylor expanded in x around inf 75.5%
mul-1-neg75.5%
associate-/l*75.3%
distribute-rgt-neg-in75.3%
distribute-neg-frac75.3%
Simplified75.3%
distribute-frac-neg75.3%
clear-num75.3%
tan-quot75.4%
distribute-rgt-neg-in75.4%
div-inv75.5%
distribute-neg-frac75.5%
Applied egg-rr75.5%
if 2.8999999999999998e-13 < F Initial program 53.0%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-undefine71.3%
Simplified71.3%
Taylor expanded in F around inf 97.2%
Final simplification87.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.8e-17)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.85e+42)
(/ x (- (tan B)))
(if (<= F 4.7e+185) (/ 1.0 B) (* x (/ -1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-17) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.85e+42) {
tmp = x / -tan(B);
} else if (F <= 4.7e+185) {
tmp = 1.0 / B;
} else {
tmp = x * (-1.0 / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.8d-17)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.85d+42) then
tmp = x / -tan(b)
else if (f <= 4.7d+185) then
tmp = 1.0d0 / b
else
tmp = x * ((-1.0d0) / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-17) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.85e+42) {
tmp = x / -Math.tan(B);
} else if (F <= 4.7e+185) {
tmp = 1.0 / B;
} else {
tmp = x * (-1.0 / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-17: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.85e+42: tmp = x / -math.tan(B) elif F <= 4.7e+185: tmp = 1.0 / B else: tmp = x * (-1.0 / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.85e+42) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 4.7e+185) tmp = Float64(1.0 / B); else tmp = Float64(x * Float64(-1.0 / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.8e-17) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.85e+42) tmp = x / -tan(B); elseif (F <= 4.7e+185) tmp = 1.0 / B; else tmp = x * (-1.0 / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e+42], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 4.7e+185], N[(1.0 / B), $MachinePrecision], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{+42}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{+185}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -1.79999999999999997e-17Initial program 68.0%
Simplified81.2%
Taylor expanded in x around 0 81.2%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
Taylor expanded in F around -inf 94.5%
if -1.79999999999999997e-17 < F < 1.84999999999999998e42Initial program 99.5%
Taylor expanded in F around -inf 41.6%
Taylor expanded in x around inf 71.8%
mul-1-neg71.8%
associate-/l*71.7%
distribute-rgt-neg-in71.7%
distribute-neg-frac71.7%
Simplified71.7%
distribute-frac-neg71.7%
clear-num71.7%
tan-quot71.7%
distribute-rgt-neg-in71.7%
div-inv71.9%
distribute-neg-frac71.9%
Applied egg-rr71.9%
if 1.84999999999999998e42 < F < 4.69999999999999972e185Initial program 55.8%
Taylor expanded in F around -inf 24.3%
Taylor expanded in B around 0 13.4%
mul-1-neg13.4%
distribute-neg-frac213.4%
Simplified13.4%
expm1-log1p-u5.1%
expm1-undefine5.0%
add-sqr-sqrt1.2%
sqrt-unprod18.3%
sqr-neg18.3%
sqrt-unprod25.1%
add-sqr-sqrt25.8%
Applied egg-rr25.8%
expm1-define25.8%
Simplified25.8%
Taylor expanded in x around 0 51.6%
if 4.69999999999999972e185 < F Initial program 28.8%
Taylor expanded in F around -inf 58.0%
Taylor expanded in x around inf 59.0%
mul-1-neg59.0%
associate-/l*58.8%
distribute-rgt-neg-in58.8%
distribute-neg-frac58.8%
Simplified58.8%
distribute-frac-neg58.8%
clear-num58.9%
tan-quot59.1%
neg-sub059.1%
Applied egg-rr59.1%
neg-sub059.1%
distribute-neg-frac59.1%
metadata-eval59.1%
Simplified59.1%
Final simplification75.7%
(FPCore (F B x)
:precision binary64
(if (<= x -8.6e-10)
(* x (/ -1.0 (tan B)))
(if (<= x -2.1e-275)
(/ -1.0 (sin B))
(if (<= x 1.35e-87) (/ (- (* F (sqrt 0.5)) x) B) (/ x (- (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -8.6e-10) {
tmp = x * (-1.0 / tan(B));
} else if (x <= -2.1e-275) {
tmp = -1.0 / sin(B);
} else if (x <= 1.35e-87) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = x / -tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-8.6d-10)) then
tmp = x * ((-1.0d0) / tan(b))
else if (x <= (-2.1d-275)) then
tmp = (-1.0d0) / sin(b)
else if (x <= 1.35d-87) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (x <= -8.6e-10) {
tmp = x * (-1.0 / Math.tan(B));
} else if (x <= -2.1e-275) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 1.35e-87) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if x <= -8.6e-10: tmp = x * (-1.0 / math.tan(B)) elif x <= -2.1e-275: tmp = -1.0 / math.sin(B) elif x <= 1.35e-87: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (x <= -8.6e-10) tmp = Float64(x * Float64(-1.0 / tan(B))); elseif (x <= -2.1e-275) tmp = Float64(-1.0 / sin(B)); elseif (x <= 1.35e-87) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (x <= -8.6e-10) tmp = x * (-1.0 / tan(B)); elseif (x <= -2.1e-275) tmp = -1.0 / sin(B); elseif (x <= 1.35e-87) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[x, -8.6e-10], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.1e-275], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e-87], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-275}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-87}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if x < -8.60000000000000029e-10Initial program 63.8%
Taylor expanded in F around -inf 90.3%
Taylor expanded in x around inf 98.4%
mul-1-neg98.4%
associate-/l*98.1%
distribute-rgt-neg-in98.1%
distribute-neg-frac98.1%
Simplified98.1%
distribute-frac-neg98.1%
clear-num98.2%
tan-quot98.4%
neg-sub098.4%
Applied egg-rr98.4%
neg-sub098.4%
distribute-neg-frac98.4%
metadata-eval98.4%
Simplified98.4%
if -8.60000000000000029e-10 < x < -2.09999999999999988e-275Initial program 80.3%
Simplified82.1%
Taylor expanded in x around 0 82.1%
associate-*l/82.1%
*-lft-identity82.1%
+-commutative82.1%
unpow282.1%
fma-undefine82.1%
Simplified82.1%
Taylor expanded in F around -inf 48.4%
Taylor expanded in x around 0 47.3%
if -2.09999999999999988e-275 < x < 1.34999999999999992e-87Initial program 65.7%
Simplified69.8%
Taylor expanded in x around 0 69.8%
associate-*l/69.8%
*-lft-identity69.8%
+-commutative69.8%
unpow269.8%
fma-undefine69.8%
Simplified69.8%
Taylor expanded in F around 0 49.1%
Taylor expanded in B around 0 41.3%
if 1.34999999999999992e-87 < x Initial program 81.1%
Taylor expanded in F around -inf 76.8%
Taylor expanded in x around inf 87.7%
mul-1-neg87.7%
associate-/l*87.5%
distribute-rgt-neg-in87.5%
distribute-neg-frac87.5%
Simplified87.5%
distribute-frac-neg87.5%
clear-num87.5%
tan-quot87.5%
distribute-rgt-neg-in87.5%
div-inv87.7%
distribute-neg-frac87.7%
Applied egg-rr87.7%
Final simplification69.3%
(FPCore (F B x)
:precision binary64
(if (<= x -8.6e-10)
(* x (/ -1.0 (tan B)))
(if (<= x -1.9e-284)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= x 1.15e-87) (/ (- (* F (sqrt 0.5)) x) B) (/ x (- (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -8.6e-10) {
tmp = x * (-1.0 / tan(B));
} else if (x <= -1.9e-284) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (x <= 1.15e-87) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = x / -tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-8.6d-10)) then
tmp = x * ((-1.0d0) / tan(b))
else if (x <= (-1.9d-284)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (x <= 1.15d-87) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (x <= -8.6e-10) {
tmp = x * (-1.0 / Math.tan(B));
} else if (x <= -1.9e-284) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (x <= 1.15e-87) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if x <= -8.6e-10: tmp = x * (-1.0 / math.tan(B)) elif x <= -1.9e-284: tmp = (-1.0 / math.sin(B)) - (x / B) elif x <= 1.15e-87: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (x <= -8.6e-10) tmp = Float64(x * Float64(-1.0 / tan(B))); elseif (x <= -1.9e-284) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (x <= 1.15e-87) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (x <= -8.6e-10) tmp = x * (-1.0 / tan(B)); elseif (x <= -1.9e-284) tmp = (-1.0 / sin(B)) - (x / B); elseif (x <= 1.15e-87) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[x, -8.6e-10], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.9e-284], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-87], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-284}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-87}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if x < -8.60000000000000029e-10Initial program 63.8%
Taylor expanded in F around -inf 90.3%
Taylor expanded in x around inf 98.4%
mul-1-neg98.4%
associate-/l*98.1%
distribute-rgt-neg-in98.1%
distribute-neg-frac98.1%
Simplified98.1%
distribute-frac-neg98.1%
clear-num98.2%
tan-quot98.4%
neg-sub098.4%
Applied egg-rr98.4%
neg-sub098.4%
distribute-neg-frac98.4%
metadata-eval98.4%
Simplified98.4%
if -8.60000000000000029e-10 < x < -1.8999999999999999e-284Initial program 80.3%
Taylor expanded in F around -inf 48.4%
Taylor expanded in B around 0 47.6%
if -1.8999999999999999e-284 < x < 1.1500000000000001e-87Initial program 65.7%
Simplified69.8%
Taylor expanded in x around 0 69.8%
associate-*l/69.8%
*-lft-identity69.8%
+-commutative69.8%
unpow269.8%
fma-undefine69.8%
Simplified69.8%
Taylor expanded in F around 0 49.1%
Taylor expanded in B around 0 41.3%
if 1.1500000000000001e-87 < x Initial program 81.1%
Taylor expanded in F around -inf 76.8%
Taylor expanded in x around inf 87.7%
mul-1-neg87.7%
associate-/l*87.5%
distribute-rgt-neg-in87.5%
distribute-neg-frac87.5%
Simplified87.5%
distribute-frac-neg87.5%
clear-num87.5%
tan-quot87.5%
distribute-rgt-neg-in87.5%
div-inv87.7%
distribute-neg-frac87.7%
Applied egg-rr87.7%
Final simplification69.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- (tan B)))))
(if (<= x -8.6e-10)
t_0
(if (<= x -2.4e-271) (/ -1.0 (sin B)) (if (<= x 8e-84) (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / -tan(B);
double tmp;
if (x <= -8.6e-10) {
tmp = t_0;
} else if (x <= -2.4e-271) {
tmp = -1.0 / sin(B);
} else if (x <= 8e-84) {
tmp = 1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / -tan(b)
if (x <= (-8.6d-10)) then
tmp = t_0
else if (x <= (-2.4d-271)) then
tmp = (-1.0d0) / sin(b)
else if (x <= 8d-84) then
tmp = 1.0d0 / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -Math.tan(B);
double tmp;
if (x <= -8.6e-10) {
tmp = t_0;
} else if (x <= -2.4e-271) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 8e-84) {
tmp = 1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / -math.tan(B) tmp = 0 if x <= -8.6e-10: tmp = t_0 elif x <= -2.4e-271: tmp = -1.0 / math.sin(B) elif x <= 8e-84: tmp = 1.0 / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-tan(B))) tmp = 0.0 if (x <= -8.6e-10) tmp = t_0; elseif (x <= -2.4e-271) tmp = Float64(-1.0 / sin(B)); elseif (x <= 8e-84) tmp = Float64(1.0 / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -tan(B); tmp = 0.0; if (x <= -8.6e-10) tmp = t_0; elseif (x <= -2.4e-271) tmp = -1.0 / sin(B); elseif (x <= 8e-84) tmp = 1.0 / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[x, -8.6e-10], t$95$0, If[LessEqual[x, -2.4e-271], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e-84], N[(1.0 / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-\tan B}\\
\mathbf{if}\;x \leq -8.6 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-271}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-84}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -8.60000000000000029e-10 or 8.0000000000000003e-84 < x Initial program 78.8%
Taylor expanded in F around -inf 79.2%
Taylor expanded in x around inf 90.6%
mul-1-neg90.6%
associate-/l*90.4%
distribute-rgt-neg-in90.4%
distribute-neg-frac90.4%
Simplified90.4%
distribute-frac-neg90.4%
clear-num90.4%
tan-quot90.4%
distribute-rgt-neg-in90.4%
div-inv90.6%
distribute-neg-frac90.6%
Applied egg-rr90.6%
if -8.60000000000000029e-10 < x < -2.4000000000000002e-271Initial program 81.2%
Simplified83.1%
Taylor expanded in x around 0 83.0%
associate-*l/83.1%
*-lft-identity83.1%
+-commutative83.1%
unpow283.1%
fma-undefine83.1%
Simplified83.1%
Taylor expanded in F around -inf 48.4%
Taylor expanded in x around 0 47.2%
if -2.4000000000000002e-271 < x < 8.0000000000000003e-84Initial program 64.6%
Taylor expanded in F around -inf 19.1%
Taylor expanded in B around 0 10.1%
mul-1-neg10.1%
distribute-neg-frac210.1%
Simplified10.1%
expm1-log1p-u3.7%
expm1-undefine3.8%
add-sqr-sqrt3.5%
sqrt-unprod10.0%
sqr-neg10.0%
sqrt-unprod12.9%
add-sqr-sqrt13.7%
Applied egg-rr13.7%
expm1-define13.9%
Simplified13.9%
Taylor expanded in x around 0 29.2%
Final simplification67.0%
(FPCore (F B x)
:precision binary64
(if (<= x -9.5e-10)
(* x (/ -1.0 (tan B)))
(if (<= x -4.5e-269)
(/ -1.0 (sin B))
(if (<= x 1.15e-83) (/ 1.0 B) (/ x (- (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -9.5e-10) {
tmp = x * (-1.0 / tan(B));
} else if (x <= -4.5e-269) {
tmp = -1.0 / sin(B);
} else if (x <= 1.15e-83) {
tmp = 1.0 / B;
} else {
tmp = x / -tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-9.5d-10)) then
tmp = x * ((-1.0d0) / tan(b))
else if (x <= (-4.5d-269)) then
tmp = (-1.0d0) / sin(b)
else if (x <= 1.15d-83) then
tmp = 1.0d0 / b
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (x <= -9.5e-10) {
tmp = x * (-1.0 / Math.tan(B));
} else if (x <= -4.5e-269) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 1.15e-83) {
tmp = 1.0 / B;
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if x <= -9.5e-10: tmp = x * (-1.0 / math.tan(B)) elif x <= -4.5e-269: tmp = -1.0 / math.sin(B) elif x <= 1.15e-83: tmp = 1.0 / B else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (x <= -9.5e-10) tmp = Float64(x * Float64(-1.0 / tan(B))); elseif (x <= -4.5e-269) tmp = Float64(-1.0 / sin(B)); elseif (x <= 1.15e-83) tmp = Float64(1.0 / B); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (x <= -9.5e-10) tmp = x * (-1.0 / tan(B)); elseif (x <= -4.5e-269) tmp = -1.0 / sin(B); elseif (x <= 1.15e-83) tmp = 1.0 / B; else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[x, -9.5e-10], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.5e-269], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-83], N[(1.0 / B), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-269}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-83}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if x < -9.50000000000000028e-10Initial program 63.8%
Taylor expanded in F around -inf 90.3%
Taylor expanded in x around inf 98.4%
mul-1-neg98.4%
associate-/l*98.1%
distribute-rgt-neg-in98.1%
distribute-neg-frac98.1%
Simplified98.1%
distribute-frac-neg98.1%
clear-num98.2%
tan-quot98.4%
neg-sub098.4%
Applied egg-rr98.4%
neg-sub098.4%
distribute-neg-frac98.4%
metadata-eval98.4%
Simplified98.4%
if -9.50000000000000028e-10 < x < -4.5000000000000001e-269Initial program 81.2%
Simplified83.1%
Taylor expanded in x around 0 83.0%
associate-*l/83.1%
*-lft-identity83.1%
+-commutative83.1%
unpow283.1%
fma-undefine83.1%
Simplified83.1%
Taylor expanded in F around -inf 48.4%
Taylor expanded in x around 0 47.2%
if -4.5000000000000001e-269 < x < 1.14999999999999995e-83Initial program 64.6%
Taylor expanded in F around -inf 19.1%
Taylor expanded in B around 0 10.1%
mul-1-neg10.1%
distribute-neg-frac210.1%
Simplified10.1%
expm1-log1p-u3.7%
expm1-undefine3.8%
add-sqr-sqrt3.5%
sqrt-unprod10.0%
sqr-neg10.0%
sqrt-unprod12.9%
add-sqr-sqrt13.7%
Applied egg-rr13.7%
expm1-define13.9%
Simplified13.9%
Taylor expanded in x around 0 29.2%
if 1.14999999999999995e-83 < x Initial program 81.6%
Taylor expanded in F around -inf 77.2%
Taylor expanded in x around inf 89.1%
mul-1-neg89.1%
associate-/l*88.9%
distribute-rgt-neg-in88.9%
distribute-neg-frac88.9%
Simplified88.9%
distribute-frac-neg88.9%
clear-num88.9%
tan-quot88.9%
distribute-rgt-neg-in88.9%
div-inv89.2%
distribute-neg-frac89.2%
Applied egg-rr89.2%
Final simplification67.1%
(FPCore (F B x)
:precision binary64
(if (<= F -4.2e+210)
(/ (- -1.0 x) B)
(if (<= F -7.6e-16)
(/ -1.0 (sin B))
(if (or (<= F 2.7e+41) (and (not (<= F 5.2e+211)) (<= F 7.4e+276)))
(/ x (- B))
(/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e+210) {
tmp = (-1.0 - x) / B;
} else if (F <= -7.6e-16) {
tmp = -1.0 / sin(B);
} else if ((F <= 2.7e+41) || (!(F <= 5.2e+211) && (F <= 7.4e+276))) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.2d+210)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-7.6d-16)) then
tmp = (-1.0d0) / sin(b)
else if ((f <= 2.7d+41) .or. (.not. (f <= 5.2d+211)) .and. (f <= 7.4d+276)) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e+210) {
tmp = (-1.0 - x) / B;
} else if (F <= -7.6e-16) {
tmp = -1.0 / Math.sin(B);
} else if ((F <= 2.7e+41) || (!(F <= 5.2e+211) && (F <= 7.4e+276))) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e+210: tmp = (-1.0 - x) / B elif F <= -7.6e-16: tmp = -1.0 / math.sin(B) elif (F <= 2.7e+41) or (not (F <= 5.2e+211) and (F <= 7.4e+276)): tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e+210) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -7.6e-16) tmp = Float64(-1.0 / sin(B)); elseif ((F <= 2.7e+41) || (!(F <= 5.2e+211) && (F <= 7.4e+276))) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.2e+210) tmp = (-1.0 - x) / B; elseif (F <= -7.6e-16) tmp = -1.0 / sin(B); elseif ((F <= 2.7e+41) || (~((F <= 5.2e+211)) && (F <= 7.4e+276))) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e+210], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -7.6e-16], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 2.7e+41], And[N[Not[LessEqual[F, 5.2e+211]], $MachinePrecision], LessEqual[F, 7.4e+276]]], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{+210}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -7.6 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{+41} \lor \neg \left(F \leq 5.2 \cdot 10^{+211}\right) \land F \leq 7.4 \cdot 10^{+276}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -4.1999999999999997e210Initial program 18.3%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 71.6%
mul-1-neg71.6%
distribute-neg-frac271.6%
Simplified71.6%
Taylor expanded in B around 0 71.6%
associate-*r/71.6%
neg-mul-171.6%
distribute-neg-in71.6%
metadata-eval71.6%
unsub-neg71.6%
Simplified71.6%
if -4.1999999999999997e210 < F < -7.60000000000000024e-16Initial program 86.8%
Simplified90.0%
Taylor expanded in x around 0 89.9%
associate-*l/90.0%
*-lft-identity90.0%
+-commutative90.0%
unpow290.0%
fma-undefine90.0%
Simplified90.0%
Taylor expanded in F around -inf 92.5%
Taylor expanded in x around 0 55.8%
if -7.60000000000000024e-16 < F < 2.7e41 or 5.1999999999999997e211 < F < 7.39999999999999955e276Initial program 91.4%
Taylor expanded in F around -inf 44.3%
Taylor expanded in B around 0 24.5%
mul-1-neg24.5%
distribute-neg-frac224.5%
Simplified24.5%
Taylor expanded in x around inf 39.7%
associate-*r/39.7%
neg-mul-139.7%
Simplified39.7%
if 2.7e41 < F < 5.1999999999999997e211 or 7.39999999999999955e276 < F Initial program 46.9%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 15.9%
mul-1-neg15.9%
distribute-neg-frac215.9%
Simplified15.9%
expm1-log1p-u8.1%
expm1-undefine8.0%
add-sqr-sqrt1.1%
sqrt-unprod12.1%
sqr-neg12.1%
sqrt-unprod18.0%
add-sqr-sqrt18.7%
Applied egg-rr18.7%
expm1-define18.7%
Simplified18.7%
Taylor expanded in x around 0 44.7%
Final simplification47.2%
(FPCore (F B x)
:precision binary64
(if (<= F -9e-14)
(/ (- -1.0 x) B)
(if (or (<= F 5.2e+40) (and (not (<= F 1.4e+209)) (<= F 9.2e+275)))
(/ x (- B))
(/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-14) {
tmp = (-1.0 - x) / B;
} else if ((F <= 5.2e+40) || (!(F <= 1.4e+209) && (F <= 9.2e+275))) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9d-14)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 5.2d+40) .or. (.not. (f <= 1.4d+209)) .and. (f <= 9.2d+275)) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9e-14) {
tmp = (-1.0 - x) / B;
} else if ((F <= 5.2e+40) || (!(F <= 1.4e+209) && (F <= 9.2e+275))) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-14: tmp = (-1.0 - x) / B elif (F <= 5.2e+40) or (not (F <= 1.4e+209) and (F <= 9.2e+275)): tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-14) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 5.2e+40) || (!(F <= 1.4e+209) && (F <= 9.2e+275))) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e-14) tmp = (-1.0 - x) / B; elseif ((F <= 5.2e+40) || (~((F <= 1.4e+209)) && (F <= 9.2e+275))) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-14], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 5.2e+40], And[N[Not[LessEqual[F, 1.4e+209]], $MachinePrecision], LessEqual[F, 9.2e+275]]], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{+40} \lor \neg \left(F \leq 1.4 \cdot 10^{+209}\right) \land F \leq 9.2 \cdot 10^{+275}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -8.9999999999999995e-14Initial program 67.3%
Taylor expanded in F around -inf 96.4%
Taylor expanded in B around 0 48.7%
mul-1-neg48.7%
distribute-neg-frac248.7%
Simplified48.7%
Taylor expanded in B around 0 48.7%
associate-*r/48.7%
neg-mul-148.7%
distribute-neg-in48.7%
metadata-eval48.7%
unsub-neg48.7%
Simplified48.7%
if -8.9999999999999995e-14 < F < 5.2000000000000001e40 or 1.40000000000000007e209 < F < 9.20000000000000043e275Initial program 91.5%
Taylor expanded in F around -inf 43.8%
Taylor expanded in B around 0 24.2%
mul-1-neg24.2%
distribute-neg-frac224.2%
Simplified24.2%
Taylor expanded in x around inf 39.2%
associate-*r/39.2%
neg-mul-139.2%
Simplified39.2%
if 5.2000000000000001e40 < F < 1.40000000000000007e209 or 9.20000000000000043e275 < F Initial program 46.9%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 15.9%
mul-1-neg15.9%
distribute-neg-frac215.9%
Simplified15.9%
expm1-log1p-u8.1%
expm1-undefine8.0%
add-sqr-sqrt1.1%
sqrt-unprod12.1%
sqr-neg12.1%
sqrt-unprod18.0%
add-sqr-sqrt18.7%
Applied egg-rr18.7%
expm1-define18.7%
Simplified18.7%
Taylor expanded in x around 0 44.7%
Final simplification43.1%
(FPCore (F B x)
:precision binary64
(if (<= F -4.2e-12)
(- (/ -1.0 B) (/ x B))
(if (or (<= F 5e+40) (and (not (<= F 3.1e+207)) (<= F 1.6e+273)))
(/ x (- B))
(/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-12) {
tmp = (-1.0 / B) - (x / B);
} else if ((F <= 5e+40) || (!(F <= 3.1e+207) && (F <= 1.6e+273))) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.2d-12)) then
tmp = ((-1.0d0) / b) - (x / b)
else if ((f <= 5d+40) .or. (.not. (f <= 3.1d+207)) .and. (f <= 1.6d+273)) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-12) {
tmp = (-1.0 / B) - (x / B);
} else if ((F <= 5e+40) || (!(F <= 3.1e+207) && (F <= 1.6e+273))) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e-12: tmp = (-1.0 / B) - (x / B) elif (F <= 5e+40) or (not (F <= 3.1e+207) and (F <= 1.6e+273)): tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e-12) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif ((F <= 5e+40) || (!(F <= 3.1e+207) && (F <= 1.6e+273))) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.2e-12) tmp = (-1.0 / B) - (x / B); elseif ((F <= 5e+40) || (~((F <= 3.1e+207)) && (F <= 1.6e+273))) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e-12], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 5e+40], And[N[Not[LessEqual[F, 3.1e+207]], $MachinePrecision], LessEqual[F, 1.6e+273]]], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+40} \lor \neg \left(F \leq 3.1 \cdot 10^{+207}\right) \land F \leq 1.6 \cdot 10^{+273}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -4.19999999999999988e-12Initial program 67.3%
Taylor expanded in F around -inf 96.4%
Taylor expanded in B around 0 48.7%
mul-1-neg48.7%
distribute-neg-frac248.7%
Simplified48.7%
Taylor expanded in x around 0 48.7%
associate-*r/48.7%
neg-mul-148.7%
Simplified48.7%
if -4.19999999999999988e-12 < F < 5.00000000000000003e40 or 3.1000000000000003e207 < F < 1.6000000000000001e273Initial program 91.5%
Taylor expanded in F around -inf 43.8%
Taylor expanded in B around 0 24.2%
mul-1-neg24.2%
distribute-neg-frac224.2%
Simplified24.2%
Taylor expanded in x around inf 39.2%
associate-*r/39.2%
neg-mul-139.2%
Simplified39.2%
if 5.00000000000000003e40 < F < 3.1000000000000003e207 or 1.6000000000000001e273 < F Initial program 46.9%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 15.9%
mul-1-neg15.9%
distribute-neg-frac215.9%
Simplified15.9%
expm1-log1p-u8.1%
expm1-undefine8.0%
add-sqr-sqrt1.1%
sqrt-unprod12.1%
sqr-neg12.1%
sqrt-unprod18.0%
add-sqr-sqrt18.7%
Applied egg-rr18.7%
expm1-define18.7%
Simplified18.7%
Taylor expanded in x around 0 44.7%
Final simplification43.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- B))))
(if (<= x -1.95e-11)
t_0
(if (<= x -2.05e-268) (/ -1.0 B) (if (<= x 2.8e-83) (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (x <= -1.95e-11) {
tmp = t_0;
} else if (x <= -2.05e-268) {
tmp = -1.0 / B;
} else if (x <= 2.8e-83) {
tmp = 1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / -b
if (x <= (-1.95d-11)) then
tmp = t_0
else if (x <= (-2.05d-268)) then
tmp = (-1.0d0) / b
else if (x <= 2.8d-83) then
tmp = 1.0d0 / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (x <= -1.95e-11) {
tmp = t_0;
} else if (x <= -2.05e-268) {
tmp = -1.0 / B;
} else if (x <= 2.8e-83) {
tmp = 1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / -B tmp = 0 if x <= -1.95e-11: tmp = t_0 elif x <= -2.05e-268: tmp = -1.0 / B elif x <= 2.8e-83: tmp = 1.0 / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-B)) tmp = 0.0 if (x <= -1.95e-11) tmp = t_0; elseif (x <= -2.05e-268) tmp = Float64(-1.0 / B); elseif (x <= 2.8e-83) tmp = Float64(1.0 / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -B; tmp = 0.0; if (x <= -1.95e-11) tmp = t_0; elseif (x <= -2.05e-268) tmp = -1.0 / B; elseif (x <= 2.8e-83) tmp = 1.0 / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-B)), $MachinePrecision]}, If[LessEqual[x, -1.95e-11], t$95$0, If[LessEqual[x, -2.05e-268], N[(-1.0 / B), $MachinePrecision], If[LessEqual[x, 2.8e-83], N[(1.0 / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-B}\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{-11}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -2.05 \cdot 10^{-268}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-83}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.95000000000000005e-11 or 2.8000000000000001e-83 < x Initial program 78.4%
Taylor expanded in F around -inf 79.5%
Taylor expanded in B around 0 40.1%
mul-1-neg40.1%
distribute-neg-frac240.1%
Simplified40.1%
Taylor expanded in x around inf 45.3%
associate-*r/45.3%
neg-mul-145.3%
Simplified45.3%
if -1.95000000000000005e-11 < x < -2.0499999999999999e-268Initial program 82.1%
Taylor expanded in F around -inf 46.7%
Taylor expanded in B around 0 26.7%
mul-1-neg26.7%
distribute-neg-frac226.7%
Simplified26.7%
Taylor expanded in x around 0 26.3%
if -2.0499999999999999e-268 < x < 2.8000000000000001e-83Initial program 64.6%
Taylor expanded in F around -inf 19.1%
Taylor expanded in B around 0 10.1%
mul-1-neg10.1%
distribute-neg-frac210.1%
Simplified10.1%
expm1-log1p-u3.7%
expm1-undefine3.8%
add-sqr-sqrt3.5%
sqrt-unprod10.0%
sqr-neg10.0%
sqrt-unprod12.9%
add-sqr-sqrt13.7%
Applied egg-rr13.7%
expm1-define13.9%
Simplified13.9%
Taylor expanded in x around 0 29.2%
Final simplification37.4%
(FPCore (F B x) :precision binary64 (if (<= F 1e-172) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1e-172) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1d-172) then
tmp = (-1.0d0) / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1e-172) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1e-172: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1e-172) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1e-172) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1e-172], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 10^{-172}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1e-172Initial program 82.5%
Taylor expanded in F around -inf 70.3%
Taylor expanded in B around 0 36.9%
mul-1-neg36.9%
distribute-neg-frac236.9%
Simplified36.9%
Taylor expanded in x around 0 16.4%
if 1e-172 < F Initial program 67.2%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 21.0%
mul-1-neg21.0%
distribute-neg-frac221.0%
Simplified21.0%
expm1-log1p-u9.7%
expm1-undefine9.5%
add-sqr-sqrt6.4%
sqrt-unprod11.7%
sqr-neg11.7%
sqrt-unprod10.6%
add-sqr-sqrt11.2%
Applied egg-rr11.2%
expm1-define11.3%
Simplified11.3%
Taylor expanded in x around 0 25.2%
Final simplification19.9%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 76.5%
Taylor expanded in F around -inf 59.1%
Taylor expanded in B around 0 30.7%
mul-1-neg30.7%
distribute-neg-frac230.7%
Simplified30.7%
Taylor expanded in x around 0 11.1%
Final simplification11.1%
herbie shell --seed 2024075
(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))))))