
(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 21 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 -5e+17)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+17) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+17) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.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 / Float64(tan(B) / x)) + 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, -5e+17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.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[(N[Tan[B], $MachinePrecision] / x), $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 -5 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;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}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5e17Initial program 47.2%
Simplified66.9%
Taylor expanded in x around 0 66.8%
associate-*l/66.8%
*-lft-identity66.8%
+-commutative66.8%
unpow266.8%
fma-undefine66.8%
Simplified66.8%
Taylor expanded in F around -inf 99.8%
if -5e17 < F < 1e8Initial program 99.4%
Simplified99.7%
if 1e8 < F Initial program 57.7%
div-inv57.7%
clear-num57.7%
Applied egg-rr57.7%
Taylor expanded in F around inf 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.65e+15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 126000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.65e+15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 126000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65e+15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 126000000.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 / Float64(tan(B) / x)) + 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, -1.65e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 126000000.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[(N[Tan[B], $MachinePrecision] / x), $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 -1.65 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 126000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.65e15Initial program 47.2%
Simplified66.9%
Taylor expanded in x around 0 66.8%
associate-*l/66.8%
*-lft-identity66.8%
+-commutative66.8%
unpow266.8%
fma-undefine66.8%
Simplified66.8%
Taylor expanded in F around -inf 99.8%
if -1.65e15 < F < 1.26e8Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
if 1.26e8 < F Initial program 57.7%
div-inv57.7%
clear-num57.7%
Applied egg-rr57.7%
Taylor expanded in F around inf 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5e+15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(- (/ F (/ (sin B) (pow (fma F F 2.0) -0.5))) t_0)
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.5e+15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (F / (sin(B) / pow(fma(F, F, 2.0), -0.5))) - t_0;
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5e+15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(F / Float64(sin(B) / (fma(F, F, 2.0) ^ -0.5))) - t_0); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + 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, -1.5e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(F * F + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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 -1.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.5e15Initial program 47.2%
Simplified66.9%
Taylor expanded in x around 0 66.8%
associate-*l/66.8%
*-lft-identity66.8%
+-commutative66.8%
unpow266.8%
fma-undefine66.8%
Simplified66.8%
Taylor expanded in F around -inf 99.8%
if -1.5e15 < F < 1e8Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
inv-pow99.7%
sqrt-pow199.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 1e8 < F Initial program 57.7%
div-inv57.7%
clear-num57.7%
Applied egg-rr57.7%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+77)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.35e+154)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (* F (/ 1.0 (* F (sin B)))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+77) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.35e+154) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (F * (1.0 / (F * sin(B)))) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+77) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.35e+154) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * 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, -2e+77], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35e+154], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+77}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.99999999999999997e77Initial program 42.8%
Simplified62.8%
Taylor expanded in x around 0 62.7%
associate-*l/62.7%
*-lft-identity62.7%
+-commutative62.7%
unpow262.7%
fma-undefine62.7%
Simplified62.7%
Taylor expanded in F around -inf 99.8%
if -1.99999999999999997e77 < F < 1.35000000000000003e154Initial program 97.0%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if 1.35000000000000003e154 < F Initial program 20.7%
Simplified38.7%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (/ (tan B) x))))
(if (<= F -160000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 100000000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / (tan(B) / x);
double tmp;
if (F <= -160000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 100000000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} 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 = (-1.0d0) / (tan(b) / x)
if (f <= (-160000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 100000000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
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 = -1.0 / (Math.tan(B) / x);
double tmp;
if (F <= -160000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 100000000.0) {
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));
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / (math.tan(B) / x) tmp = 0 if F <= -160000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 100000000.0: 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)) return tmp
function code(F, B, x) t_0 = Float64(-1.0 / Float64(tan(B) / x)) tmp = 0.0 if (F <= -160000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 100000000.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(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / (tan(B) / x); tmp = 0.0; if (F <= -160000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 100000000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = t_0 + (1.0 / sin(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, -160000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.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[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{if}\;F \leq -160000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;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}{\sin B}\\
\end{array}
\end{array}
if F < -1.6e8Initial program 48.8%
Simplified67.9%
Taylor expanded in x around 0 67.9%
associate-*l/67.9%
*-lft-identity67.9%
+-commutative67.9%
unpow267.9%
fma-undefine67.9%
Simplified67.9%
Taylor expanded in F around -inf 99.8%
if -1.6e8 < F < 1e8Initial program 99.4%
div-inv99.7%
clear-num99.5%
Applied egg-rr99.5%
if 1e8 < F Initial program 57.7%
div-inv57.7%
clear-num57.7%
Applied egg-rr57.7%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -115000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 76000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -115000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 76000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-115000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 76000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -115000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 76000000.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.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -115000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 76000000.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.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -115000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 76000000.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 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -115000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 76000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -115000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 76000000.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[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -115000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 76000000:\\
\;\;\;\;\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}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.15e8Initial program 48.8%
Simplified67.9%
Taylor expanded in x around 0 67.9%
associate-*l/67.9%
*-lft-identity67.9%
+-commutative67.9%
unpow267.9%
fma-undefine67.9%
Simplified67.9%
Taylor expanded in F around -inf 99.8%
if -1.15e8 < F < 7.6e7Initial program 99.4%
if 7.6e7 < F Initial program 57.7%
div-inv57.7%
clear-num57.7%
Applied egg-rr57.7%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.36)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.36) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (-1.0 / (tan(B) / x)) + (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 <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.36d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((-1.0d0) / (tan(b) / x)) + (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 <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.36) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.36: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) 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 / sin(B)) - t_0); elseif (F <= 1.36) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + 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 <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.36) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (-1.0 / (tan(B) / x)) + (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, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.36], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.36:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 49.4%
Simplified68.3%
Taylor expanded in x around 0 68.3%
associate-*l/68.3%
*-lft-identity68.3%
+-commutative68.3%
unpow268.3%
fma-undefine68.3%
Simplified68.3%
Taylor expanded in F around -inf 99.3%
if -1.3999999999999999 < F < 1.3600000000000001Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.6%
if 1.3600000000000001 < F Initial program 57.7%
div-inv57.7%
clear-num57.7%
Applied egg-rr57.7%
Taylor expanded in F around inf 99.8%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B))))
(if (<= F -140000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.3e-160)
t_0
(if (<= F 7.5e-170)
(/ x (- (tan B)))
(if (<= F 370000.0)
t_0
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -140000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.3e-160) {
tmp = t_0;
} else if (F <= 7.5e-170) {
tmp = x / -tan(B);
} else if (F <= 370000.0) {
tmp = t_0;
} else {
tmp = (-1.0 / (tan(B) / x)) + (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 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
if (f <= (-140000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.3d-160)) then
tmp = t_0
else if (f <= 7.5d-170) then
tmp = x / -tan(b)
else if (f <= 370000.0d0) then
tmp = t_0
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -140000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.3e-160) {
tmp = t_0;
} else if (F <= 7.5e-170) {
tmp = x / -Math.tan(B);
} else if (F <= 370000.0) {
tmp = t_0;
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) tmp = 0 if F <= -140000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.3e-160: tmp = t_0 elif F <= 7.5e-170: tmp = x / -math.tan(B) elif F <= 370000.0: tmp = t_0 else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) tmp = 0.0 if (F <= -140000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.3e-160) tmp = t_0; elseif (F <= 7.5e-170) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 370000.0) tmp = t_0; else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); tmp = 0.0; if (F <= -140000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.3e-160) tmp = t_0; elseif (F <= 7.5e-170) tmp = x / -tan(B); elseif (F <= 370000.0) tmp = t_0; else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$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 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -140000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.3e-160], t$95$0, If[LessEqual[F, 7.5e-170], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 370000.0], t$95$0, N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{if}\;F \leq -140000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{-160}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-170}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 370000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.4e5Initial program 48.8%
Simplified67.9%
Taylor expanded in x around 0 67.9%
associate-*l/67.9%
*-lft-identity67.9%
+-commutative67.9%
unpow267.9%
fma-undefine67.9%
Simplified67.9%
Taylor expanded in F around -inf 99.8%
if -1.4e5 < F < -1.30000000000000002e-160 or 7.4999999999999998e-170 < F < 3.7e5Initial program 99.4%
Taylor expanded in B around 0 79.7%
if -1.30000000000000002e-160 < F < 7.4999999999999998e-170Initial program 99.4%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 90.1%
mul-1-neg90.1%
associate-/l*89.9%
distribute-lft-neg-in89.9%
Simplified89.9%
distribute-lft-neg-out89.9%
neg-sub089.9%
clear-num89.8%
un-div-inv90.1%
quot-tan90.2%
Applied egg-rr90.2%
neg-sub090.2%
distribute-neg-frac90.2%
Simplified90.2%
if 3.7e5 < F Initial program 57.7%
div-inv57.7%
clear-num57.7%
Applied egg-rr57.7%
Taylor expanded in F around inf 99.8%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(if (<= F -2.5e-18)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.4e-24)
(/ x (- (tan B)))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-18) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.4e-24) {
tmp = x / -tan(B);
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.5d-18)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.4d-24) then
tmp = x / -tan(b)
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-18) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.4e-24) {
tmp = x / -Math.tan(B);
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.5e-18: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.4e-24: tmp = x / -math.tan(B) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.5e-18) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.4e-24) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.5e-18) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.4e-24) tmp = x / -tan(B); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.5e-18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-24], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.50000000000000018e-18Initial program 51.0%
Simplified69.3%
Taylor expanded in x around 0 69.3%
associate-*l/69.2%
*-lft-identity69.2%
+-commutative69.2%
unpow269.2%
fma-undefine69.2%
Simplified69.2%
Taylor expanded in F around -inf 96.5%
if -2.50000000000000018e-18 < F < 1.4000000000000001e-24Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in x around inf 74.3%
mul-1-neg74.3%
associate-/l*74.2%
distribute-lft-neg-in74.2%
Simplified74.2%
distribute-lft-neg-out74.2%
neg-sub074.2%
clear-num74.1%
un-div-inv74.3%
quot-tan74.4%
Applied egg-rr74.4%
neg-sub074.4%
distribute-neg-frac74.4%
Simplified74.4%
if 1.4000000000000001e-24 < F Initial program 61.5%
div-inv61.6%
clear-num61.6%
Applied egg-rr61.6%
Taylor expanded in F around inf 91.6%
Final simplification87.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.3e-23)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8e-25) (/ x (- (tan B))) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.3e-23) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8e-25) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.3d-23)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8d-25) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.3e-23) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8e-25) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.3e-23: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8e-25: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.3e-23) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8e-25) 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 <= -5.3e-23) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8e-25) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.3e-23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-25], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.3 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.30000000000000042e-23Initial program 51.0%
Simplified69.3%
Taylor expanded in x around 0 69.3%
associate-*l/69.2%
*-lft-identity69.2%
+-commutative69.2%
unpow269.2%
fma-undefine69.2%
Simplified69.2%
Taylor expanded in F around -inf 96.5%
if -5.30000000000000042e-23 < F < 8.00000000000000031e-25Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in x around inf 74.3%
mul-1-neg74.3%
associate-/l*74.2%
distribute-lft-neg-in74.2%
Simplified74.2%
distribute-lft-neg-out74.2%
neg-sub074.2%
clear-num74.1%
un-div-inv74.3%
quot-tan74.4%
Applied egg-rr74.4%
neg-sub074.4%
distribute-neg-frac74.4%
Simplified74.4%
if 8.00000000000000031e-25 < F Initial program 61.5%
Simplified72.4%
Taylor expanded in x around 0 72.4%
associate-*l/72.4%
*-lft-identity72.4%
+-commutative72.4%
unpow272.4%
fma-undefine72.4%
Simplified72.4%
Taylor expanded in F around inf 91.6%
Final simplification87.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.8e-16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2e-24) (/ x (- (tan B))) (- (* F (/ 1.0 (* F B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.8e-16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2e-24) {
tmp = x / -tan(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.8d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2d-24) then
tmp = x / -tan(b)
else
tmp = (f * (1.0d0 / (f * b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.8e-16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2e-24) {
tmp = x / -Math.tan(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.8e-16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2e-24: tmp = x / -math.tan(B) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.8e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2e-24) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.8e-16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2e-24) tmp = x / -tan(B); else tmp = (F * (1.0 / (F * B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2e-24], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -6.8e-16Initial program 51.0%
Simplified69.3%
Taylor expanded in x around 0 69.3%
associate-*l/69.2%
*-lft-identity69.2%
+-commutative69.2%
unpow269.2%
fma-undefine69.2%
Simplified69.2%
Taylor expanded in F around -inf 96.5%
if -6.8e-16 < F < 1.99999999999999985e-24Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in x around inf 74.3%
mul-1-neg74.3%
associate-/l*74.2%
distribute-lft-neg-in74.2%
Simplified74.2%
distribute-lft-neg-out74.2%
neg-sub074.2%
clear-num74.1%
un-div-inv74.3%
quot-tan74.4%
Applied egg-rr74.4%
neg-sub074.4%
distribute-neg-frac74.4%
Simplified74.4%
if 1.99999999999999985e-24 < F Initial program 61.5%
Simplified72.4%
Taylor expanded in F around inf 91.4%
Taylor expanded in B around 0 67.3%
Final simplification80.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))) (t_1 (/ x (- (tan B)))))
(if (<= F -1.25e+264)
t_0
(if (<= F -1.7e+202)
t_1
(if (<= F -4.95e+151)
t_0
(if (<= F -9e+104)
t_1
(if (<= F -1.3e+36)
t_0
(if (<= F 2.8e-9) t_1 (/ (- 1.0 x) B)))))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double t_1 = x / -tan(B);
double tmp;
if (F <= -1.25e+264) {
tmp = t_0;
} else if (F <= -1.7e+202) {
tmp = t_1;
} else if (F <= -4.95e+151) {
tmp = t_0;
} else if (F <= -9e+104) {
tmp = t_1;
} else if (F <= -1.3e+36) {
tmp = t_0;
} else if (F <= 2.8e-9) {
tmp = t_1;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-1.0d0) / sin(b)
t_1 = x / -tan(b)
if (f <= (-1.25d+264)) then
tmp = t_0
else if (f <= (-1.7d+202)) then
tmp = t_1
else if (f <= (-4.95d+151)) then
tmp = t_0
else if (f <= (-9d+104)) then
tmp = t_1
else if (f <= (-1.3d+36)) then
tmp = t_0
else if (f <= 2.8d-9) then
tmp = t_1
else
tmp = (1.0d0 - x) / b
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 / -Math.tan(B);
double tmp;
if (F <= -1.25e+264) {
tmp = t_0;
} else if (F <= -1.7e+202) {
tmp = t_1;
} else if (F <= -4.95e+151) {
tmp = t_0;
} else if (F <= -9e+104) {
tmp = t_1;
} else if (F <= -1.3e+36) {
tmp = t_0;
} else if (F <= 2.8e-9) {
tmp = t_1;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) t_1 = x / -math.tan(B) tmp = 0 if F <= -1.25e+264: tmp = t_0 elif F <= -1.7e+202: tmp = t_1 elif F <= -4.95e+151: tmp = t_0 elif F <= -9e+104: tmp = t_1 elif F <= -1.3e+36: tmp = t_0 elif F <= 2.8e-9: tmp = t_1 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) t_1 = Float64(x / Float64(-tan(B))) tmp = 0.0 if (F <= -1.25e+264) tmp = t_0; elseif (F <= -1.7e+202) tmp = t_1; elseif (F <= -4.95e+151) tmp = t_0; elseif (F <= -9e+104) tmp = t_1; elseif (F <= -1.3e+36) tmp = t_0; elseif (F <= 2.8e-9) tmp = t_1; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); t_1 = x / -tan(B); tmp = 0.0; if (F <= -1.25e+264) tmp = t_0; elseif (F <= -1.7e+202) tmp = t_1; elseif (F <= -4.95e+151) tmp = t_0; elseif (F <= -9e+104) tmp = t_1; elseif (F <= -1.3e+36) tmp = t_0; elseif (F <= 2.8e-9) tmp = t_1; else tmp = (1.0 - x) / B; 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[Tan[B], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[F, -1.25e+264], t$95$0, If[LessEqual[F, -1.7e+202], t$95$1, If[LessEqual[F, -4.95e+151], t$95$0, If[LessEqual[F, -9e+104], t$95$1, If[LessEqual[F, -1.3e+36], t$95$0, If[LessEqual[F, 2.8e-9], t$95$1, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{x}{-\tan B}\\
\mathbf{if}\;F \leq -1.25 \cdot 10^{+264}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{+202}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -4.95 \cdot 10^{+151}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -9 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{+36}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.25000000000000008e264 or -1.7e202 < F < -4.95000000000000008e151 or -8.9999999999999997e104 < F < -1.3000000000000001e36Initial program 36.2%
Simplified50.5%
Taylor expanded in x around 0 50.4%
associate-*l/50.5%
*-lft-identity50.5%
+-commutative50.5%
unpow250.5%
fma-undefine50.5%
Simplified50.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 76.5%
if -1.25000000000000008e264 < F < -1.7e202 or -4.95000000000000008e151 < F < -8.9999999999999997e104 or -1.3000000000000001e36 < F < 2.79999999999999984e-9Initial program 87.6%
Taylor expanded in F around -inf 53.6%
Taylor expanded in x around inf 70.1%
mul-1-neg70.1%
associate-/l*69.9%
distribute-lft-neg-in69.9%
Simplified69.9%
distribute-lft-neg-out69.9%
neg-sub069.9%
clear-num69.9%
un-div-inv70.0%
quot-tan70.1%
Applied egg-rr70.1%
neg-sub070.1%
distribute-neg-frac70.1%
Simplified70.1%
if 2.79999999999999984e-9 < F Initial program 59.7%
Taylor expanded in F around -inf 30.5%
Taylor expanded in B around 0 19.6%
mul-1-neg19.6%
distribute-neg-frac219.6%
Simplified19.6%
add-cbrt-cube12.0%
pow312.0%
add-sqr-sqrt9.8%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod9.9%
add-sqr-sqrt17.6%
Applied egg-rr17.6%
rem-cbrt-cube40.1%
frac-2neg40.1%
div-inv40.1%
distribute-neg-in40.1%
metadata-eval40.1%
add-sqr-sqrt20.5%
sqrt-unprod44.4%
sqr-neg44.4%
sqrt-unprod29.8%
add-sqr-sqrt58.5%
Applied egg-rr58.5%
associate-*r/58.5%
*-rgt-identity58.5%
distribute-frac-neg258.5%
distribute-frac-neg58.5%
distribute-neg-in58.5%
metadata-eval58.5%
unsub-neg58.5%
Simplified58.5%
Final simplification68.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= F -3.25e+240)
t_1
(if (<= F -1.35e+144)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.5e-72)
t_1
(if (<= F 1.65e-25)
(/ x (- (tan B)))
(- (* F (/ 1.0 (* F B))) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -3.25e+240) {
tmp = t_1;
} else if (F <= -1.35e+144) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.5e-72) {
tmp = t_1;
} else if (F <= 1.65e-25) {
tmp = x / -tan(B);
} else {
tmp = (F * (1.0 / (F * 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
if (f <= (-3.25d+240)) then
tmp = t_1
else if (f <= (-1.35d+144)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.5d-72)) then
tmp = t_1
else if (f <= 1.65d-25) then
tmp = x / -tan(b)
else
tmp = (f * (1.0d0 / (f * 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 t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -3.25e+240) {
tmp = t_1;
} else if (F <= -1.35e+144) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.5e-72) {
tmp = t_1;
} else if (F <= 1.65e-25) {
tmp = x / -Math.tan(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 tmp = 0 if F <= -3.25e+240: tmp = t_1 elif F <= -1.35e+144: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.5e-72: tmp = t_1 elif F <= 1.65e-25: tmp = x / -math.tan(B) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (F <= -3.25e+240) tmp = t_1; elseif (F <= -1.35e+144) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.5e-72) tmp = t_1; elseif (F <= 1.65e-25) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / B) - t_0; tmp = 0.0; if (F <= -3.25e+240) tmp = t_1; elseif (F <= -1.35e+144) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.5e-72) tmp = t_1; elseif (F <= 1.65e-25) tmp = x / -tan(B); else tmp = (F * (1.0 / (F * B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -3.25e+240], t$95$1, If[LessEqual[F, -1.35e+144], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.5e-72], t$95$1, If[LessEqual[F, 1.65e-25], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t\_0\\
\mathbf{if}\;F \leq -3.25 \cdot 10^{+240}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{+144}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -3.25000000000000009e240 or -1.35000000000000008e144 < F < -1.5e-72Initial program 64.5%
Simplified80.5%
Taylor expanded in x around 0 80.5%
associate-*l/80.5%
*-lft-identity80.5%
+-commutative80.5%
unpow280.5%
fma-undefine80.5%
Simplified80.5%
Taylor expanded in F around -inf 90.3%
Taylor expanded in B around 0 77.2%
if -3.25000000000000009e240 < F < -1.35000000000000008e144Initial program 28.1%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.9%
if -1.5e-72 < F < 1.6499999999999999e-25Initial program 99.4%
Taylor expanded in F around -inf 34.1%
Taylor expanded in x around inf 75.9%
mul-1-neg75.9%
associate-/l*75.7%
distribute-lft-neg-in75.7%
Simplified75.7%
distribute-lft-neg-out75.7%
neg-sub075.7%
clear-num75.7%
un-div-inv75.9%
quot-tan76.0%
Applied egg-rr76.0%
neg-sub076.0%
distribute-neg-frac76.0%
Simplified76.0%
if 1.6499999999999999e-25 < F Initial program 61.5%
Simplified72.4%
Taylor expanded in F around inf 91.4%
Taylor expanded in B around 0 67.3%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -3.7e+240)
t_0
(if (<= F -1.15e+145)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.5e-72)
t_0
(if (<= F 2.8e-9) (/ x (- (tan B))) (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -3.7e+240) {
tmp = t_0;
} else if (F <= -1.15e+145) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.5e-72) {
tmp = t_0;
} else if (F <= 2.8e-9) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-3.7d+240)) then
tmp = t_0
else if (f <= (-1.15d+145)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.5d-72)) then
tmp = t_0
else if (f <= 2.8d-9) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -3.7e+240) {
tmp = t_0;
} else if (F <= -1.15e+145) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.5e-72) {
tmp = t_0;
} else if (F <= 2.8e-9) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -3.7e+240: tmp = t_0 elif F <= -1.15e+145: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.5e-72: tmp = t_0 elif F <= 2.8e-9: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -3.7e+240) tmp = t_0; elseif (F <= -1.15e+145) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.5e-72) tmp = t_0; elseif (F <= 2.8e-9) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -3.7e+240) tmp = t_0; elseif (F <= -1.15e+145) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.5e-72) tmp = t_0; elseif (F <= 2.8e-9) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.7e+240], t$95$0, If[LessEqual[F, -1.15e+145], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.5e-72], t$95$0, If[LessEqual[F, 2.8e-9], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.7 \cdot 10^{+240}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{+145}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-72}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.7000000000000001e240 or -1.15e145 < F < -1.5e-72Initial program 64.5%
Simplified80.5%
Taylor expanded in x around 0 80.5%
associate-*l/80.5%
*-lft-identity80.5%
+-commutative80.5%
unpow280.5%
fma-undefine80.5%
Simplified80.5%
Taylor expanded in F around -inf 90.3%
Taylor expanded in B around 0 77.2%
if -3.7000000000000001e240 < F < -1.15e145Initial program 28.1%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.9%
if -1.5e-72 < F < 2.79999999999999984e-9Initial program 99.4%
Taylor expanded in F around -inf 33.0%
Taylor expanded in x around inf 73.5%
mul-1-neg73.5%
associate-/l*73.4%
distribute-lft-neg-in73.4%
Simplified73.4%
distribute-lft-neg-out73.4%
neg-sub073.4%
clear-num73.4%
un-div-inv73.6%
quot-tan73.6%
Applied egg-rr73.6%
neg-sub073.6%
distribute-neg-frac73.6%
Simplified73.6%
if 2.79999999999999984e-9 < F Initial program 59.7%
Taylor expanded in F around -inf 30.5%
Taylor expanded in B around 0 19.6%
mul-1-neg19.6%
distribute-neg-frac219.6%
Simplified19.6%
add-cbrt-cube12.0%
pow312.0%
add-sqr-sqrt9.8%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod9.9%
add-sqr-sqrt17.6%
Applied egg-rr17.6%
rem-cbrt-cube40.1%
frac-2neg40.1%
div-inv40.1%
distribute-neg-in40.1%
metadata-eval40.1%
add-sqr-sqrt20.5%
sqrt-unprod44.4%
sqr-neg44.4%
sqrt-unprod29.8%
add-sqr-sqrt58.5%
Applied egg-rr58.5%
associate-*r/58.5%
*-rgt-identity58.5%
distribute-frac-neg258.5%
distribute-frac-neg58.5%
distribute-neg-in58.5%
metadata-eval58.5%
unsub-neg58.5%
Simplified58.5%
Final simplification72.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -9e+200)
t_0
(if (<= F -1.5e+153)
(/ -1.0 (sin B))
(if (<= F -1.5e-72)
t_0
(if (<= F 2.8e-9) (/ x (- (tan B))) (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -9e+200) {
tmp = t_0;
} else if (F <= -1.5e+153) {
tmp = -1.0 / sin(B);
} else if (F <= -1.5e-72) {
tmp = t_0;
} else if (F <= 2.8e-9) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-9d+200)) then
tmp = t_0
else if (f <= (-1.5d+153)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-1.5d-72)) then
tmp = t_0
else if (f <= 2.8d-9) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -9e+200) {
tmp = t_0;
} else if (F <= -1.5e+153) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -1.5e-72) {
tmp = t_0;
} else if (F <= 2.8e-9) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -9e+200: tmp = t_0 elif F <= -1.5e+153: tmp = -1.0 / math.sin(B) elif F <= -1.5e-72: tmp = t_0 elif F <= 2.8e-9: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -9e+200) tmp = t_0; elseif (F <= -1.5e+153) tmp = Float64(-1.0 / sin(B)); elseif (F <= -1.5e-72) tmp = t_0; elseif (F <= 2.8e-9) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -9e+200) tmp = t_0; elseif (F <= -1.5e+153) tmp = -1.0 / sin(B); elseif (F <= -1.5e-72) tmp = t_0; elseif (F <= 2.8e-9) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9e+200], t$95$0, If[LessEqual[F, -1.5e+153], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.5e-72], t$95$0, If[LessEqual[F, 2.8e-9], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9 \cdot 10^{+200}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-72}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.99999999999999939e200 or -1.50000000000000009e153 < F < -1.5e-72Initial program 59.9%
Simplified79.2%
Taylor expanded in x around 0 79.1%
associate-*l/79.1%
*-lft-identity79.1%
+-commutative79.1%
unpow279.1%
fma-undefine79.1%
Simplified79.1%
Taylor expanded in F around -inf 91.8%
Taylor expanded in B around 0 76.5%
if -8.99999999999999939e200 < F < -1.50000000000000009e153Initial program 21.2%
Simplified27.6%
Taylor expanded in x around 0 27.6%
associate-*l/27.6%
*-lft-identity27.6%
+-commutative27.6%
unpow227.6%
fma-undefine27.6%
Simplified27.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around 0 79.6%
if -1.5e-72 < F < 2.79999999999999984e-9Initial program 99.4%
Taylor expanded in F around -inf 33.0%
Taylor expanded in x around inf 73.5%
mul-1-neg73.5%
associate-/l*73.4%
distribute-lft-neg-in73.4%
Simplified73.4%
distribute-lft-neg-out73.4%
neg-sub073.4%
clear-num73.4%
un-div-inv73.6%
quot-tan73.6%
Applied egg-rr73.6%
neg-sub073.6%
distribute-neg-frac73.6%
Simplified73.6%
if 2.79999999999999984e-9 < F Initial program 59.7%
Taylor expanded in F around -inf 30.5%
Taylor expanded in B around 0 19.6%
mul-1-neg19.6%
distribute-neg-frac219.6%
Simplified19.6%
add-cbrt-cube12.0%
pow312.0%
add-sqr-sqrt9.8%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod9.9%
add-sqr-sqrt17.6%
Applied egg-rr17.6%
rem-cbrt-cube40.1%
frac-2neg40.1%
div-inv40.1%
distribute-neg-in40.1%
metadata-eval40.1%
add-sqr-sqrt20.5%
sqrt-unprod44.4%
sqr-neg44.4%
sqrt-unprod29.8%
add-sqr-sqrt58.5%
Applied egg-rr58.5%
associate-*r/58.5%
*-rgt-identity58.5%
distribute-frac-neg258.5%
distribute-frac-neg58.5%
distribute-neg-in58.5%
metadata-eval58.5%
unsub-neg58.5%
Simplified58.5%
Final simplification71.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.3e+202)
(/ (- -1.0 x) B)
(if (<= F -1.5e+15)
(/ -1.0 (sin B))
(if (<= F 1.65e-25) (/ x (- B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e+202) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.5e+15) {
tmp = -1.0 / sin(B);
} else if (F <= 1.65e-25) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.3d+202)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-1.5d+15)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.65d-25) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e+202) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.5e+15) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.65e-25) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e+202: tmp = (-1.0 - x) / B elif F <= -1.5e+15: tmp = -1.0 / math.sin(B) elif F <= 1.65e-25: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e+202) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -1.5e+15) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.65e-25) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e+202) tmp = (-1.0 - x) / B; elseif (F <= -1.5e+15) tmp = -1.0 / sin(B); elseif (F <= 1.65e-25) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e+202], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.5e+15], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.65e-25], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{+202}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.3000000000000001e202Initial program 34.8%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 58.1%
mul-1-neg58.1%
distribute-neg-frac258.1%
Simplified58.1%
if -1.3000000000000001e202 < F < -1.5e15Initial program 57.7%
Simplified75.5%
Taylor expanded in x around 0 75.5%
associate-*l/75.4%
*-lft-identity75.4%
+-commutative75.4%
unpow275.4%
fma-undefine75.4%
Simplified75.4%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around 0 61.4%
if -1.5e15 < F < 1.6499999999999999e-25Initial program 99.4%
Taylor expanded in F around -inf 35.7%
Taylor expanded in B around 0 22.0%
mul-1-neg22.0%
distribute-neg-frac222.0%
Simplified22.0%
Taylor expanded in x around inf 40.5%
associate-*r/40.5%
mul-1-neg40.5%
Simplified40.5%
if 1.6499999999999999e-25 < F Initial program 61.5%
Taylor expanded in F around -inf 29.2%
Taylor expanded in B around 0 18.8%
mul-1-neg18.8%
distribute-neg-frac218.8%
Simplified18.8%
add-cbrt-cube11.6%
pow311.6%
add-sqr-sqrt9.5%
sqrt-unprod19.0%
sqr-neg19.0%
sqrt-unprod9.5%
add-sqr-sqrt17.0%
Applied egg-rr17.0%
rem-cbrt-cube38.4%
frac-2neg38.4%
div-inv38.4%
distribute-neg-in38.4%
metadata-eval38.4%
add-sqr-sqrt19.7%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod28.5%
add-sqr-sqrt56.0%
Applied egg-rr56.0%
associate-*r/56.1%
*-rgt-identity56.1%
distribute-frac-neg256.1%
distribute-frac-neg56.1%
distribute-neg-in56.1%
metadata-eval56.1%
unsub-neg56.1%
Simplified56.1%
Final simplification51.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- B))))
(if (<= F -6.6e+243)
(/ -1.0 B)
(if (<= F -7.9e+201)
t_0
(if (<= F -1.24e+17)
(/ -1.0 B)
(if (<= F 5.2e-26) t_0 (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (F <= -6.6e+243) {
tmp = -1.0 / B;
} else if (F <= -7.9e+201) {
tmp = t_0;
} else if (F <= -1.24e+17) {
tmp = -1.0 / B;
} else if (F <= 5.2e-26) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / -b
if (f <= (-6.6d+243)) then
tmp = (-1.0d0) / b
else if (f <= (-7.9d+201)) then
tmp = t_0
else if (f <= (-1.24d+17)) then
tmp = (-1.0d0) / b
else if (f <= 5.2d-26) then
tmp = t_0
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (F <= -6.6e+243) {
tmp = -1.0 / B;
} else if (F <= -7.9e+201) {
tmp = t_0;
} else if (F <= -1.24e+17) {
tmp = -1.0 / B;
} else if (F <= 5.2e-26) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / -B tmp = 0 if F <= -6.6e+243: tmp = -1.0 / B elif F <= -7.9e+201: tmp = t_0 elif F <= -1.24e+17: tmp = -1.0 / B elif F <= 5.2e-26: tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-B)) tmp = 0.0 if (F <= -6.6e+243) tmp = Float64(-1.0 / B); elseif (F <= -7.9e+201) tmp = t_0; elseif (F <= -1.24e+17) tmp = Float64(-1.0 / B); elseif (F <= 5.2e-26) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -B; tmp = 0.0; if (F <= -6.6e+243) tmp = -1.0 / B; elseif (F <= -7.9e+201) tmp = t_0; elseif (F <= -1.24e+17) tmp = -1.0 / B; elseif (F <= 5.2e-26) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-B)), $MachinePrecision]}, If[LessEqual[F, -6.6e+243], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, -7.9e+201], t$95$0, If[LessEqual[F, -1.24e+17], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 5.2e-26], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-B}\\
\mathbf{if}\;F \leq -6.6 \cdot 10^{+243}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq -7.9 \cdot 10^{+201}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.24 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-26}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.59999999999999989e243 or -7.89999999999999966e201 < F < -1.24e17Initial program 49.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 47.8%
mul-1-neg47.8%
distribute-neg-frac247.8%
Simplified47.8%
Taylor expanded in x around 0 37.3%
if -6.59999999999999989e243 < F < -7.89999999999999966e201 or -1.24e17 < F < 5.2000000000000002e-26Initial program 91.0%
Taylor expanded in F around -inf 43.9%
Taylor expanded in B around 0 27.1%
mul-1-neg27.1%
distribute-neg-frac227.1%
Simplified27.1%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
mul-1-neg42.4%
Simplified42.4%
if 5.2000000000000002e-26 < F Initial program 61.5%
Taylor expanded in F around -inf 29.2%
Taylor expanded in B around 0 18.8%
mul-1-neg18.8%
distribute-neg-frac218.8%
Simplified18.8%
add-cbrt-cube11.6%
pow311.6%
add-sqr-sqrt9.5%
sqrt-unprod19.0%
sqr-neg19.0%
sqrt-unprod9.5%
add-sqr-sqrt17.0%
Applied egg-rr17.0%
rem-cbrt-cube38.4%
frac-2neg38.4%
div-inv38.4%
distribute-neg-in38.4%
metadata-eval38.4%
add-sqr-sqrt19.7%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod28.5%
add-sqr-sqrt56.0%
Applied egg-rr56.0%
associate-*r/56.1%
*-rgt-identity56.1%
distribute-frac-neg256.1%
distribute-frac-neg56.1%
distribute-neg-in56.1%
metadata-eval56.1%
unsub-neg56.1%
Simplified56.1%
Final simplification44.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- B))))
(if (<= F -4.2e+243)
(/ -1.0 B)
(if (<= F -7.5e+201)
t_0
(if (<= F -1.52e+15) (/ -1.0 B) (if (<= F 3.1e-24) t_0 (/ 1.0 B)))))))
double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (F <= -4.2e+243) {
tmp = -1.0 / B;
} else if (F <= -7.5e+201) {
tmp = t_0;
} else if (F <= -1.52e+15) {
tmp = -1.0 / B;
} else if (F <= 3.1e-24) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x / -b
if (f <= (-4.2d+243)) then
tmp = (-1.0d0) / b
else if (f <= (-7.5d+201)) then
tmp = t_0
else if (f <= (-1.52d+15)) then
tmp = (-1.0d0) / b
else if (f <= 3.1d-24) then
tmp = t_0
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (F <= -4.2e+243) {
tmp = -1.0 / B;
} else if (F <= -7.5e+201) {
tmp = t_0;
} else if (F <= -1.52e+15) {
tmp = -1.0 / B;
} else if (F <= 3.1e-24) {
tmp = t_0;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / -B tmp = 0 if F <= -4.2e+243: tmp = -1.0 / B elif F <= -7.5e+201: tmp = t_0 elif F <= -1.52e+15: tmp = -1.0 / B elif F <= 3.1e-24: tmp = t_0 else: tmp = 1.0 / B return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-B)) tmp = 0.0 if (F <= -4.2e+243) tmp = Float64(-1.0 / B); elseif (F <= -7.5e+201) tmp = t_0; elseif (F <= -1.52e+15) tmp = Float64(-1.0 / B); elseif (F <= 3.1e-24) tmp = t_0; else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -B; tmp = 0.0; if (F <= -4.2e+243) tmp = -1.0 / B; elseif (F <= -7.5e+201) tmp = t_0; elseif (F <= -1.52e+15) tmp = -1.0 / B; elseif (F <= 3.1e-24) tmp = t_0; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-B)), $MachinePrecision]}, If[LessEqual[F, -4.2e+243], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, -7.5e+201], t$95$0, If[LessEqual[F, -1.52e+15], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 3.1e-24], t$95$0, N[(1.0 / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+243}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{+201}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.52 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -4.1999999999999999e243 or -7.5000000000000004e201 < F < -1.52e15Initial program 49.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 47.8%
mul-1-neg47.8%
distribute-neg-frac247.8%
Simplified47.8%
Taylor expanded in x around 0 37.3%
if -4.1999999999999999e243 < F < -7.5000000000000004e201 or -1.52e15 < F < 3.1e-24Initial program 91.0%
Taylor expanded in F around -inf 43.9%
Taylor expanded in B around 0 27.1%
mul-1-neg27.1%
distribute-neg-frac227.1%
Simplified27.1%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
mul-1-neg42.4%
Simplified42.4%
if 3.1e-24 < F Initial program 61.5%
Taylor expanded in F around -inf 29.2%
Taylor expanded in B around 0 18.8%
mul-1-neg18.8%
distribute-neg-frac218.8%
Simplified18.8%
add-cbrt-cube11.6%
pow311.6%
add-sqr-sqrt9.5%
sqrt-unprod19.0%
sqr-neg19.0%
sqrt-unprod9.5%
add-sqr-sqrt17.0%
Applied egg-rr17.0%
Taylor expanded in x around 0 39.1%
Final simplification40.1%
(FPCore (F B x) :precision binary64 (if (<= F -1.5e-72) (/ (- -1.0 x) B) (if (<= F 1.95e-25) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-72) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.95e-25) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d-72)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.95d-25) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-72) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.95e-25) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-72: tmp = (-1.0 - x) / B elif F <= 1.95e-25: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-72) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.95e-25) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-72) tmp = (-1.0 - x) / B; elseif (F <= 1.95e-25) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-72], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.95e-25], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.5e-72Initial program 53.8%
Taylor expanded in F around -inf 92.9%
Taylor expanded in B around 0 48.7%
mul-1-neg48.7%
distribute-neg-frac248.7%
Simplified48.7%
if -1.5e-72 < F < 1.95e-25Initial program 99.4%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 19.5%
mul-1-neg19.5%
distribute-neg-frac219.5%
Simplified19.5%
Taylor expanded in x around inf 41.7%
associate-*r/41.7%
mul-1-neg41.7%
Simplified41.7%
if 1.95e-25 < F Initial program 61.5%
Taylor expanded in F around -inf 29.2%
Taylor expanded in B around 0 18.8%
mul-1-neg18.8%
distribute-neg-frac218.8%
Simplified18.8%
add-cbrt-cube11.6%
pow311.6%
add-sqr-sqrt9.5%
sqrt-unprod19.0%
sqr-neg19.0%
sqrt-unprod9.5%
add-sqr-sqrt17.0%
Applied egg-rr17.0%
rem-cbrt-cube38.4%
frac-2neg38.4%
div-inv38.4%
distribute-neg-in38.4%
metadata-eval38.4%
add-sqr-sqrt19.7%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod28.5%
add-sqr-sqrt56.0%
Applied egg-rr56.0%
associate-*r/56.1%
*-rgt-identity56.1%
distribute-frac-neg256.1%
distribute-frac-neg56.1%
distribute-neg-in56.1%
metadata-eval56.1%
unsub-neg56.1%
Simplified56.1%
Final simplification48.1%
(FPCore (F B x) :precision binary64 (if (<= F 6.4e-28) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 6.4e-28) {
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 <= 6.4d-28) 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 <= 6.4e-28) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 6.4e-28: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 6.4e-28) 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 <= 6.4e-28) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 6.4e-28], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 6.4 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 6.39999999999999964e-28Initial program 74.9%
Taylor expanded in F around -inf 65.8%
Taylor expanded in B around 0 35.3%
mul-1-neg35.3%
distribute-neg-frac235.3%
Simplified35.3%
Taylor expanded in x around 0 18.2%
if 6.39999999999999964e-28 < F Initial program 62.1%
Taylor expanded in F around -inf 28.8%
Taylor expanded in B around 0 18.5%
mul-1-neg18.5%
distribute-neg-frac218.5%
Simplified18.5%
add-cbrt-cube11.4%
pow311.4%
add-sqr-sqrt9.3%
sqrt-unprod18.8%
sqr-neg18.8%
sqrt-unprod9.5%
add-sqr-sqrt16.8%
Applied egg-rr16.8%
Taylor expanded in x around 0 38.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 71.6%
Taylor expanded in F around -inf 56.3%
Taylor expanded in B around 0 31.0%
mul-1-neg31.0%
distribute-neg-frac231.0%
Simplified31.0%
Taylor expanded in x around 0 14.1%
herbie shell --seed 2024108
(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))))))