
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+125)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.64)
(- (/ F (/ (sin B) (pow (fma F F 2.0) -0.5))) t_0)
(- (/ (/ F (+ 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+125) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.64) {
tmp = (F / (sin(B) / pow(fma(F, F, 2.0), -0.5))) - t_0;
} else {
tmp = ((F / (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+125) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.64) tmp = Float64(Float64(F / Float64(sin(B) / (fma(F, F, 2.0) ^ -0.5))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / 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+125], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.64], 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[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+125}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.64:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.9999999999999998e125Initial program 35.0%
+-commutative35.0%
unsub-neg35.0%
associate-*l/58.4%
associate-*r/58.3%
*-commutative58.3%
Simplified58.4%
Taylor expanded in x around 0 58.4%
associate-*l/58.4%
*-lft-identity58.4%
unpow258.4%
fma-udef58.4%
Simplified58.4%
Taylor expanded in F around -inf 99.8%
if -1.9999999999999998e125 < F < 0.640000000000000013Initial program 98.0%
+-commutative98.0%
unsub-neg98.0%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
clear-num99.7%
un-div-inv99.8%
inv-pow99.8%
sqrt-pow199.8%
metadata-eval99.8%
Applied egg-rr99.8%
if 0.640000000000000013 < F Initial program 59.9%
+-commutative59.9%
unsub-neg59.9%
associate-*l/71.4%
associate-*r/71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.4%
*-lft-identity71.4%
unpow271.4%
fma-udef71.4%
Simplified71.4%
expm1-log1p-u42.9%
expm1-udef42.9%
associate-*r/43.0%
sqrt-div43.0%
metadata-eval43.0%
un-div-inv43.0%
Applied egg-rr43.0%
expm1-def42.9%
expm1-log1p71.5%
Simplified71.5%
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 -4e+154)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.64)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ (/ F (+ 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 <= -4e+154) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.64) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = ((F / (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 <= -4e+154) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.64) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / 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, -4e+154], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.64], 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[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -4 \cdot 10^{+154}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.64:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.00000000000000015e154Initial program 31.1%
+-commutative31.1%
unsub-neg31.1%
associate-*l/49.2%
associate-*r/49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in x around 0 49.2%
associate-*l/49.2%
*-lft-identity49.2%
unpow249.2%
fma-udef49.2%
Simplified49.2%
Taylor expanded in F around -inf 99.8%
if -4.00000000000000015e154 < F < 0.640000000000000013Initial program 94.8%
+-commutative94.8%
unsub-neg94.8%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u73.7%
expm1-udef57.6%
associate-*r/57.6%
sqrt-div57.6%
metadata-eval57.6%
un-div-inv57.6%
Applied egg-rr57.6%
expm1-def73.7%
expm1-log1p99.7%
Simplified99.7%
if 0.640000000000000013 < F Initial program 59.9%
+-commutative59.9%
unsub-neg59.9%
associate-*l/71.4%
associate-*r/71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.4%
*-lft-identity71.4%
unpow271.4%
fma-udef71.4%
Simplified71.4%
expm1-log1p-u42.9%
expm1-udef42.9%
associate-*r/43.0%
sqrt-div43.0%
metadata-eval43.0%
un-div-inv43.0%
Applied egg-rr43.0%
expm1-def42.9%
expm1-log1p71.5%
Simplified71.5%
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 -150000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.64)
(- (* F (/ (sqrt (/ -1.0 (- -2.0 (* F F)))) (sin B))) t_0)
(- (/ (/ F (+ 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 <= -150000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.64) {
tmp = (F * (sqrt((-1.0 / (-2.0 - (F * F)))) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-150000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.64d0) then
tmp = (f * (sqrt(((-1.0d0) / ((-2.0d0) - (f * f)))) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -150000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.64) {
tmp = (F * (Math.sqrt((-1.0 / (-2.0 - (F * F)))) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -150000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.64: tmp = (F * (math.sqrt((-1.0 / (-2.0 - (F * F)))) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -150000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.64) tmp = Float64(Float64(F * Float64(sqrt(Float64(-1.0 / Float64(-2.0 - Float64(F * F)))) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -150000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.64) tmp = (F * (sqrt((-1.0 / (-2.0 - (F * F)))) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -150000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.64], N[(N[(F * N[(N[Sqrt[N[(-1.0 / N[(-2.0 - N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -150000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.64:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{-1}{-2 - F \cdot F}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.5e8Initial program 51.6%
+-commutative51.6%
unsub-neg51.6%
associate-*l/70.5%
associate-*r/70.4%
*-commutative70.4%
Simplified70.5%
Taylor expanded in x around 0 70.6%
associate-*l/70.5%
*-lft-identity70.5%
unpow270.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in F around -inf 99.8%
if -1.5e8 < F < 0.640000000000000013Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
frac-2neg99.7%
metadata-eval99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
metadata-eval99.7%
neg-sub099.7%
fma-udef99.7%
unpow299.7%
+-commutative99.7%
associate--r+99.7%
metadata-eval99.7%
unpow299.7%
Simplified99.7%
if 0.640000000000000013 < F Initial program 59.9%
+-commutative59.9%
unsub-neg59.9%
associate-*l/71.4%
associate-*r/71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.4%
*-lft-identity71.4%
unpow271.4%
fma-udef71.4%
Simplified71.4%
expm1-log1p-u42.9%
expm1-udef42.9%
associate-*r/43.0%
sqrt-div43.0%
metadata-eval43.0%
un-div-inv43.0%
Applied egg-rr43.0%
expm1-def42.9%
expm1-log1p71.5%
Simplified71.5%
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 -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.64)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ 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 <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.64) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.64d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.64) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.64: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.64) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.64) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.64], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.64:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 52.2%
+-commutative52.2%
unsub-neg52.2%
associate-*l/70.9%
associate-*r/70.8%
*-commutative70.8%
Simplified70.9%
Taylor expanded in x around 0 70.9%
associate-*l/70.9%
*-lft-identity70.9%
unpow270.9%
fma-udef70.9%
Simplified70.9%
expm1-log1p-u42.8%
expm1-udef42.8%
associate-*r/42.8%
sqrt-div42.8%
metadata-eval42.8%
un-div-inv42.8%
Applied egg-rr42.8%
expm1-def42.8%
expm1-log1p71.0%
Simplified71.0%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
Simplified99.6%
if -0.900000000000000022 < F < 0.640000000000000013Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.0%
if 0.640000000000000013 < F Initial program 59.9%
+-commutative59.9%
unsub-neg59.9%
associate-*l/71.4%
associate-*r/71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.4%
*-lft-identity71.4%
unpow271.4%
fma-udef71.4%
Simplified71.4%
expm1-log1p-u42.9%
expm1-udef42.9%
associate-*r/43.0%
sqrt-div43.0%
metadata-eval43.0%
un-div-inv43.0%
Applied egg-rr43.0%
expm1-def42.9%
expm1-log1p71.5%
Simplified71.5%
Taylor expanded in F around inf 99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.64)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ (/ F (+ 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 <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.64) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.64d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.64) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.64: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.64) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.64) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.64], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.64:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 52.2%
+-commutative52.2%
unsub-neg52.2%
associate-*l/70.9%
associate-*r/70.8%
*-commutative70.8%
Simplified70.9%
Taylor expanded in x around 0 70.9%
associate-*l/70.9%
*-lft-identity70.9%
unpow270.9%
fma-udef70.9%
Simplified70.9%
expm1-log1p-u42.8%
expm1-udef42.8%
associate-*r/42.8%
sqrt-div42.8%
metadata-eval42.8%
un-div-inv42.8%
Applied egg-rr42.8%
expm1-def42.8%
expm1-log1p71.0%
Simplified71.0%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
Simplified99.6%
if -0.900000000000000022 < F < 0.640000000000000013Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.0%
if 0.640000000000000013 < F Initial program 59.9%
+-commutative59.9%
unsub-neg59.9%
associate-*l/71.4%
associate-*r/71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.4%
*-lft-identity71.4%
unpow271.4%
fma-udef71.4%
Simplified71.4%
expm1-log1p-u42.9%
expm1-udef42.9%
associate-*r/43.0%
sqrt-div43.0%
metadata-eval43.0%
un-div-inv43.0%
Applied egg-rr43.0%
expm1-def42.9%
expm1-log1p71.5%
Simplified71.5%
Taylor expanded in F around inf 99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.65e-34)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 7e-9)
(- (* F (* (sqrt (/ 1.0 (+ 2.0 (* F F)))) (/ 1.0 B))) t_0)
(- (/ (/ F (+ 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 <= -3.65e-34) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 7e-9) {
tmp = (F * (sqrt((1.0 / (2.0 + (F * F)))) * (1.0 / B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-3.65d-34)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 7d-9) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (f * f)))) * (1.0d0 / b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -3.65e-34) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 7e-9) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (F * F)))) * (1.0 / B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.65e-34: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 7e-9: tmp = (F * (math.sqrt((1.0 / (2.0 + (F * F)))) * (1.0 / B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.65e-34) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 7e-9) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(F * F)))) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -3.65e-34) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 7e-9) tmp = (F * (sqrt((1.0 / (2.0 + (F * F)))) * (1.0 / B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -3.65e-34], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7e-9], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.65 \cdot 10^{-34}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + F \cdot F}} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.64999999999999998e-34Initial program 53.9%
+-commutative53.9%
unsub-neg53.9%
associate-*l/71.9%
associate-*r/71.8%
*-commutative71.8%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
unpow271.9%
fma-udef71.9%
Simplified71.9%
expm1-log1p-u44.9%
expm1-udef43.7%
associate-*r/43.7%
sqrt-div43.7%
metadata-eval43.7%
un-div-inv43.7%
Applied egg-rr43.7%
expm1-def44.9%
expm1-log1p72.0%
Simplified72.0%
Taylor expanded in F around -inf 97.6%
mul-1-neg97.6%
Simplified97.6%
if -3.64999999999999998e-34 < F < 6.9999999999999998e-9Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
frac-2neg99.7%
metadata-eval99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
metadata-eval99.7%
neg-sub099.7%
fma-udef99.7%
unpow299.7%
+-commutative99.7%
associate--r+99.7%
metadata-eval99.7%
unpow299.7%
Simplified99.7%
Taylor expanded in B around 0 83.2%
+-commutative83.2%
unpow283.2%
Simplified83.2%
if 6.9999999999999998e-9 < F Initial program 60.5%
+-commutative60.5%
unsub-neg60.5%
associate-*l/71.8%
associate-*r/71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in x around 0 71.8%
associate-*l/71.8%
*-lft-identity71.8%
unpow271.8%
fma-udef71.8%
Simplified71.8%
expm1-log1p-u43.7%
expm1-udef43.2%
associate-*r/43.3%
sqrt-div43.3%
metadata-eval43.3%
un-div-inv43.3%
Applied egg-rr43.3%
expm1-def43.7%
expm1-log1p71.9%
Simplified71.9%
Taylor expanded in F around inf 98.6%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.15)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F 9.2e-98)
(- (/ (- (* F F)) (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.15) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= 9.2e-98) {
tmp = (-(F * F) / 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.15d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= 9.2d-98) then
tmp = (-(f * f) / 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.15) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 9.2e-98) {
tmp = (-(F * F) / 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.15: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= 9.2e-98: tmp = (-(F * F) / 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.15) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 9.2e-98) tmp = Float64(Float64(Float64(-Float64(F * F)) / 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.15) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= 9.2e-98) tmp = (-(F * F) / 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.15], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9.2e-98], N[(N[((-N[(F * F), $MachinePrecision]) / N[Sin[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 -1.15:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{-F \cdot F}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.1499999999999999Initial program 52.2%
+-commutative52.2%
unsub-neg52.2%
associate-*l/70.9%
associate-*r/70.8%
*-commutative70.8%
Simplified70.9%
Taylor expanded in x around 0 70.9%
associate-*l/70.9%
*-lft-identity70.9%
unpow270.9%
fma-udef70.9%
Simplified70.9%
expm1-log1p-u42.8%
expm1-udef42.8%
associate-*r/42.8%
sqrt-div42.8%
metadata-eval42.8%
un-div-inv42.8%
Applied egg-rr42.8%
expm1-def42.8%
expm1-log1p71.0%
Simplified71.0%
Taylor expanded in F around -inf 99.6%
sub-neg99.6%
unpow299.6%
metadata-eval99.6%
Simplified99.6%
if -1.1499999999999999 < F < 9.20000000000000002e-98Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u87.0%
expm1-udef68.7%
associate-*r/68.7%
sqrt-div68.7%
metadata-eval68.7%
un-div-inv68.7%
Applied egg-rr68.7%
expm1-def87.0%
expm1-log1p99.7%
Simplified99.7%
Taylor expanded in F around -inf 74.0%
mul-1-neg74.0%
Simplified74.0%
Taylor expanded in F around 0 74.0%
associate-*r/74.0%
mul-1-neg74.0%
unpow274.0%
distribute-rgt-neg-in74.0%
Simplified74.0%
if 9.20000000000000002e-98 < F Initial program 65.3%
+-commutative65.3%
unsub-neg65.3%
associate-*l/75.2%
associate-*r/75.1%
*-commutative75.1%
Simplified75.2%
Taylor expanded in x around 0 75.1%
associate-*l/75.2%
*-lft-identity75.2%
unpow275.2%
fma-udef75.2%
Simplified75.2%
Taylor expanded in F around inf 90.3%
Final simplification87.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.85)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(- (/ (/ F (+ 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 <= -0.85) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.85d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.85) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.85: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.85) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.85) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.85], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.85:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.849999999999999978Initial program 52.2%
+-commutative52.2%
unsub-neg52.2%
associate-*l/70.9%
associate-*r/70.8%
*-commutative70.8%
Simplified70.9%
Taylor expanded in x around 0 70.9%
associate-*l/70.9%
*-lft-identity70.9%
unpow270.9%
fma-udef70.9%
Simplified70.9%
expm1-log1p-u42.8%
expm1-udef42.8%
associate-*r/42.8%
sqrt-div42.8%
metadata-eval42.8%
un-div-inv42.8%
Applied egg-rr42.8%
expm1-def42.8%
expm1-log1p71.0%
Simplified71.0%
Taylor expanded in F around -inf 99.6%
sub-neg99.6%
unpow299.6%
metadata-eval99.6%
Simplified99.6%
if -0.849999999999999978 < F Initial program 83.6%
+-commutative83.6%
unsub-neg83.6%
associate-*l/88.2%
associate-*r/88.1%
*-commutative88.1%
Simplified88.3%
Taylor expanded in x around 0 88.3%
associate-*l/88.3%
*-lft-identity88.3%
unpow288.3%
fma-udef88.3%
Simplified88.3%
expm1-log1p-u68.9%
expm1-udef56.2%
associate-*r/56.2%
sqrt-div56.2%
metadata-eval56.2%
un-div-inv56.2%
Applied egg-rr56.2%
expm1-def68.9%
expm1-log1p88.4%
Simplified88.4%
Taylor expanded in F around inf 81.6%
Final simplification87.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e-140)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(- (/ (/ F (+ 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-140) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-2d-140)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -2e-140) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2e-140: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e-140) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -2e-140) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -2e-140], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{-140}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2e-140Initial program 62.1%
+-commutative62.1%
unsub-neg62.1%
associate-*l/76.9%
associate-*r/76.8%
*-commutative76.8%
Simplified76.9%
Taylor expanded in x around 0 77.0%
associate-*l/76.9%
*-lft-identity76.9%
unpow276.9%
fma-udef76.9%
Simplified76.9%
expm1-log1p-u51.8%
expm1-udef47.0%
associate-*r/47.0%
sqrt-div47.0%
metadata-eval47.0%
un-div-inv47.0%
Applied egg-rr47.0%
expm1-def51.7%
expm1-log1p77.0%
Simplified77.0%
Taylor expanded in F around -inf 91.1%
mul-1-neg91.1%
Simplified91.1%
if -2e-140 < F Initial program 81.5%
+-commutative81.5%
unsub-neg81.5%
associate-*l/86.7%
associate-*r/86.6%
*-commutative86.6%
Simplified86.8%
Taylor expanded in x around 0 86.8%
associate-*l/86.8%
*-lft-identity86.8%
unpow286.8%
fma-udef86.8%
Simplified86.8%
expm1-log1p-u66.7%
expm1-udef55.3%
associate-*r/55.4%
sqrt-div55.4%
metadata-eval55.4%
un-div-inv55.4%
Applied egg-rr55.4%
expm1-def66.7%
expm1-log1p86.9%
Simplified86.9%
Taylor expanded in F around inf 84.9%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8.8e-98)
(- (/ (- (* F F)) (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.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8.8e-98) {
tmp = (-(F * F) / 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.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8.8d-98) then
tmp = (-(f * f) / 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.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8.8e-98) {
tmp = (-(F * F) / 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.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8.8e-98: tmp = (-(F * F) / 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.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8.8e-98) tmp = Float64(Float64(Float64(-Float64(F * F)) / 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.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8.8e-98) tmp = (-(F * F) / 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.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.8e-98], N[(N[((-N[(F * F), $MachinePrecision]) / N[Sin[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 -1:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-98}:\\
\;\;\;\;\frac{-F \cdot F}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1Initial program 52.2%
+-commutative52.2%
unsub-neg52.2%
associate-*l/70.9%
associate-*r/70.8%
*-commutative70.8%
Simplified70.9%
Taylor expanded in x around 0 70.9%
associate-*l/70.9%
*-lft-identity70.9%
unpow270.9%
fma-udef70.9%
Simplified70.9%
Taylor expanded in F around -inf 99.2%
if -1 < F < 8.79999999999999985e-98Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u87.0%
expm1-udef68.7%
associate-*r/68.7%
sqrt-div68.7%
metadata-eval68.7%
un-div-inv68.7%
Applied egg-rr68.7%
expm1-def87.0%
expm1-log1p99.7%
Simplified99.7%
Taylor expanded in F around -inf 74.0%
mul-1-neg74.0%
Simplified74.0%
Taylor expanded in F around 0 74.0%
associate-*r/74.0%
mul-1-neg74.0%
unpow274.0%
distribute-rgt-neg-in74.0%
Simplified74.0%
if 8.79999999999999985e-98 < F Initial program 65.3%
+-commutative65.3%
unsub-neg65.3%
associate-*l/75.2%
associate-*r/75.1%
*-commutative75.1%
Simplified75.2%
Taylor expanded in x around 0 75.1%
associate-*l/75.2%
*-lft-identity75.2%
unpow275.2%
fma-udef75.2%
Simplified75.2%
Taylor expanded in F around inf 90.3%
Final simplification87.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.55e-33)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 9.2e-98)
(- (/ (- x) (tan B)) (/ (/ F (+ F (/ 1.0 F))) B))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.55e-33) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 9.2e-98) {
tmp = (-x / tan(B)) - ((F / (F + (1.0 / F))) / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.55d-33)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 9.2d-98) then
tmp = (-x / tan(b)) - ((f / (f + (1.0d0 / f))) / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.55e-33) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 9.2e-98) {
tmp = (-x / Math.tan(B)) - ((F / (F + (1.0 / F))) / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.55e-33: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 9.2e-98: tmp = (-x / math.tan(B)) - ((F / (F + (1.0 / F))) / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.55e-33) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 9.2e-98) tmp = Float64(Float64(Float64(-x) / tan(B)) - Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.55e-33) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 9.2e-98) tmp = (-x / tan(B)) - ((F / (F + (1.0 / F))) / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.55e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9.2e-98], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] - N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.55 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{-x}{\tan B} - \frac{\frac{F}{F + \frac{1}{F}}}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.54999999999999998e-33Initial program 53.9%
+-commutative53.9%
unsub-neg53.9%
associate-*l/71.9%
associate-*r/71.8%
*-commutative71.8%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
unpow271.9%
fma-udef71.9%
Simplified71.9%
Taylor expanded in F around -inf 97.1%
if -1.54999999999999998e-33 < F < 9.20000000000000002e-98Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u86.6%
expm1-udef68.8%
associate-*r/68.8%
sqrt-div68.8%
metadata-eval68.8%
un-div-inv68.8%
Applied egg-rr68.8%
expm1-def86.6%
expm1-log1p99.7%
Simplified99.7%
Taylor expanded in F around -inf 75.1%
mul-1-neg75.1%
Simplified75.1%
Taylor expanded in B around 0 75.1%
mul-1-neg75.1%
associate-/r*75.1%
distribute-frac-neg75.1%
distribute-neg-frac75.1%
Simplified75.1%
if 9.20000000000000002e-98 < F Initial program 65.3%
+-commutative65.3%
unsub-neg65.3%
associate-*l/75.2%
associate-*r/75.1%
*-commutative75.1%
Simplified75.2%
Taylor expanded in x around 0 75.1%
associate-*l/75.2%
*-lft-identity75.2%
unpow275.2%
fma-udef75.2%
Simplified75.2%
Taylor expanded in F around inf 90.3%
Final simplification87.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5e-33)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.55e-16)
(- (/ (- x) (tan B)) (/ (/ F (+ F (/ 1.0 F))) B))
(if (or (<= F 1.15e+150) (not (<= F 3.8e+239)))
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.5e-33) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.55e-16) {
tmp = (-x / tan(B)) - ((F / (F + (1.0 / F))) / B);
} else if ((F <= 1.15e+150) || !(F <= 3.8e+239)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / 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.5d-33)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.55d-16) then
tmp = (-x / tan(b)) - ((f / (f + (1.0d0 / f))) / b)
else if ((f <= 1.15d+150) .or. (.not. (f <= 3.8d+239))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / 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.5e-33) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.55e-16) {
tmp = (-x / Math.tan(B)) - ((F / (F + (1.0 / F))) / B);
} else if ((F <= 1.15e+150) || !(F <= 3.8e+239)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.5e-33: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.55e-16: tmp = (-x / math.tan(B)) - ((F / (F + (1.0 / F))) / B) elif (F <= 1.15e+150) or not (F <= 3.8e+239): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5e-33) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.55e-16) tmp = Float64(Float64(Float64(-x) / tan(B)) - Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B)); elseif ((F <= 1.15e+150) || !(F <= 3.8e+239)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / 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.5e-33) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.55e-16) tmp = (-x / tan(B)) - ((F / (F + (1.0 / F))) / B); elseif ((F <= 1.15e+150) || ~((F <= 3.8e+239))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / 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.5e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.55e-16], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] - N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.15e+150], N[Not[LessEqual[F, 3.8e+239]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.55 \cdot 10^{-16}:\\
\;\;\;\;\frac{-x}{\tan B} - \frac{\frac{F}{F + \frac{1}{F}}}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{+150} \lor \neg \left(F \leq 3.8 \cdot 10^{+239}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.5000000000000001e-33Initial program 53.9%
+-commutative53.9%
unsub-neg53.9%
associate-*l/71.9%
associate-*r/71.8%
*-commutative71.8%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
unpow271.9%
fma-udef71.9%
Simplified71.9%
Taylor expanded in F around -inf 97.1%
if -1.5000000000000001e-33 < F < 3.55e-16Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u86.7%
expm1-udef65.7%
associate-*r/65.7%
sqrt-div65.7%
metadata-eval65.7%
un-div-inv65.7%
Applied egg-rr65.7%
expm1-def86.7%
expm1-log1p99.7%
Simplified99.7%
Taylor expanded in F around -inf 71.5%
mul-1-neg71.5%
Simplified71.5%
Taylor expanded in B around 0 71.5%
mul-1-neg71.5%
associate-/r*71.5%
distribute-frac-neg71.5%
distribute-neg-frac71.5%
Simplified71.5%
if 3.55e-16 < F < 1.15000000000000001e150 or 3.8000000000000001e239 < F Initial program 58.5%
Taylor expanded in B around 0 38.6%
*-commutative38.6%
Simplified38.6%
Taylor expanded in F around inf 66.6%
Taylor expanded in B around 0 86.5%
if 1.15000000000000001e150 < F < 3.8000000000000001e239Initial program 67.3%
+-commutative67.3%
unsub-neg67.3%
associate-*l/77.0%
associate-*r/77.0%
*-commutative77.0%
Simplified77.2%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 86.2%
Final simplification83.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1.55e-33)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.5e-16)
(- (/ (- x) (tan B)) (/ (/ F (+ F (/ 1.0 F))) B))
(if (or (<= F 6.5e+149) (not (<= F 2.3e+239)))
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.55e-33) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.5e-16) {
tmp = (-x / tan(B)) - ((F / (F + (1.0 / F))) / B);
} else if ((F <= 6.5e+149) || !(F <= 2.3e+239)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.55d-33)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.5d-16) then
tmp = (-x / tan(b)) - ((f / (f + (1.0d0 / f))) / b)
else if ((f <= 6.5d+149) .or. (.not. (f <= 2.3d+239))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.55e-33) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.5e-16) {
tmp = (-x / Math.tan(B)) - ((F / (F + (1.0 / F))) / B);
} else if ((F <= 6.5e+149) || !(F <= 2.3e+239)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.55e-33: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.5e-16: tmp = (-x / math.tan(B)) - ((F / (F + (1.0 / F))) / B) elif (F <= 6.5e+149) or not (F <= 2.3e+239): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.55e-33) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.5e-16) tmp = Float64(Float64(Float64(-x) / tan(B)) - Float64(Float64(F / Float64(F + Float64(1.0 / F))) / B)); elseif ((F <= 6.5e+149) || !(F <= 2.3e+239)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.55e-33) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.5e-16) tmp = (-x / tan(B)) - ((F / (F + (1.0 / F))) / B); elseif ((F <= 6.5e+149) || ~((F <= 2.3e+239))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.55e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e-16], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] - N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 6.5e+149], N[Not[LessEqual[F, 2.3e+239]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.55 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{-x}{\tan B} - \frac{\frac{F}{F + \frac{1}{F}}}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{+149} \lor \neg \left(F \leq 2.3 \cdot 10^{+239}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.54999999999999998e-33Initial program 53.9%
Taylor expanded in F around -inf 97.1%
Taylor expanded in B around 0 77.0%
if -1.54999999999999998e-33 < F < 3.50000000000000017e-16Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u86.7%
expm1-udef65.7%
associate-*r/65.7%
sqrt-div65.7%
metadata-eval65.7%
un-div-inv65.7%
Applied egg-rr65.7%
expm1-def86.7%
expm1-log1p99.7%
Simplified99.7%
Taylor expanded in F around -inf 71.5%
mul-1-neg71.5%
Simplified71.5%
Taylor expanded in B around 0 71.5%
mul-1-neg71.5%
associate-/r*71.5%
distribute-frac-neg71.5%
distribute-neg-frac71.5%
Simplified71.5%
if 3.50000000000000017e-16 < F < 6.50000000000000015e149 or 2.3000000000000002e239 < F Initial program 58.5%
Taylor expanded in B around 0 38.6%
*-commutative38.6%
Simplified38.6%
Taylor expanded in F around inf 66.6%
Taylor expanded in B around 0 86.5%
if 6.50000000000000015e149 < F < 2.3000000000000002e239Initial program 67.3%
+-commutative67.3%
unsub-neg67.3%
associate-*l/77.0%
associate-*r/77.0%
*-commutative77.0%
Simplified77.2%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 86.2%
Final simplification77.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (+ F (/ 1.0 F))))
(if (<= F -8.5e-35)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.3e-256)
(- (/ -1.0 B) t_0)
(if (<= F 5.1e-132)
(-
(-
(*
B
(+ (* (/ F t_1) -0.16666666666666666) (* x 0.3333333333333333)))
(/ F (* B t_1)))
(/ x B))
(if (<= F 2.4e+239)
(- (/ 1.0 B) t_0)
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = F + (1.0 / F);
double tmp;
if (F <= -8.5e-35) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.3e-256) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 5.1e-132) {
tmp = ((B * (((F / t_1) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_1))) - (x / B);
} else if (F <= 2.4e+239) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = f + (1.0d0 / f)
if (f <= (-8.5d-35)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.3d-256)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 5.1d-132) then
tmp = ((b * (((f / t_1) * (-0.16666666666666666d0)) + (x * 0.3333333333333333d0))) - (f / (b * t_1))) - (x / b)
else if (f <= 2.4d+239) then
tmp = (1.0d0 / b) - t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = F + (1.0 / F);
double tmp;
if (F <= -8.5e-35) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.3e-256) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 5.1e-132) {
tmp = ((B * (((F / t_1) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_1))) - (x / B);
} else if (F <= 2.4e+239) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = F + (1.0 / F) tmp = 0 if F <= -8.5e-35: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.3e-256: tmp = (-1.0 / B) - t_0 elif F <= 5.1e-132: tmp = ((B * (((F / t_1) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_1))) - (x / B) elif F <= 2.4e+239: tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(F + Float64(1.0 / F)) tmp = 0.0 if (F <= -8.5e-35) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.3e-256) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 5.1e-132) tmp = Float64(Float64(Float64(B * Float64(Float64(Float64(F / t_1) * -0.16666666666666666) + Float64(x * 0.3333333333333333))) - Float64(F / Float64(B * t_1))) - Float64(x / B)); elseif (F <= 2.4e+239) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = F + (1.0 / F); tmp = 0.0; if (F <= -8.5e-35) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.3e-256) tmp = (-1.0 / B) - t_0; elseif (F <= 5.1e-132) tmp = ((B * (((F / t_1) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_1))) - (x / B); elseif (F <= 2.4e+239) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - (x / B); 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[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.5e-35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.3e-256], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.1e-132], N[(N[(N[(B * N[(N[(N[(F / t$95$1), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(F / N[(B * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e+239], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := F + \frac{1}{F}\\
\mathbf{if}\;F \leq -8.5 \cdot 10^{-35}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.3 \cdot 10^{-256}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 5.1 \cdot 10^{-132}:\\
\;\;\;\;\left(B \cdot \left(\frac{F}{t_1} \cdot -0.16666666666666666 + x \cdot 0.3333333333333333\right) - \frac{F}{B \cdot t_1}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{+239}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.5000000000000001e-35Initial program 53.9%
Taylor expanded in F around -inf 97.1%
Taylor expanded in B around 0 77.0%
if -8.5000000000000001e-35 < F < -3.3e-256Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.7%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around -inf 43.8%
Taylor expanded in B around 0 54.3%
if -3.3e-256 < F < 5.10000000000000005e-132Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.7%
Taylor expanded in x around 0 99.8%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u89.1%
expm1-udef75.1%
associate-*r/75.1%
sqrt-div75.1%
metadata-eval75.1%
un-div-inv75.1%
Applied egg-rr75.1%
expm1-def89.2%
expm1-log1p99.8%
Simplified99.8%
Taylor expanded in F around -inf 83.7%
mul-1-neg83.7%
Simplified83.7%
Taylor expanded in B around 0 62.4%
if 5.10000000000000005e-132 < F < 2.4e239Initial program 85.2%
+-commutative85.2%
unsub-neg85.2%
associate-*l/93.2%
associate-*r/93.0%
*-commutative93.0%
Simplified93.2%
Taylor expanded in F around inf 77.4%
*-commutative77.4%
associate-/r*77.5%
Simplified77.5%
Taylor expanded in B around 0 64.0%
if 2.4e239 < F Initial program 11.9%
Taylor expanded in B around 0 1.4%
*-commutative1.4%
Simplified1.4%
Taylor expanded in F around inf 65.5%
Taylor expanded in B around 0 90.2%
Final simplification68.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (+ F (/ 1.0 F))))
(if (<= F -8.5e-35)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4e-256)
(- (/ -1.0 B) t_0)
(if (<= F 7.5e-132)
(-
(-
(*
B
(+ (* (/ F t_1) -0.16666666666666666) (* x 0.3333333333333333)))
(/ F (* B t_1)))
(/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = F + (1.0 / F);
double tmp;
if (F <= -8.5e-35) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4e-256) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 7.5e-132) {
tmp = ((B * (((F / t_1) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_1))) - (x / B);
} else {
tmp = (1.0 / 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 = f + (1.0d0 / f)
if (f <= (-8.5d-35)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4d-256)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 7.5d-132) then
tmp = ((b * (((f / t_1) * (-0.16666666666666666d0)) + (x * 0.3333333333333333d0))) - (f / (b * t_1))) - (x / b)
else
tmp = (1.0d0 / 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 = F + (1.0 / F);
double tmp;
if (F <= -8.5e-35) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4e-256) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 7.5e-132) {
tmp = ((B * (((F / t_1) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_1))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = F + (1.0 / F) tmp = 0 if F <= -8.5e-35: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4e-256: tmp = (-1.0 / B) - t_0 elif F <= 7.5e-132: tmp = ((B * (((F / t_1) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_1))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(F + Float64(1.0 / F)) tmp = 0.0 if (F <= -8.5e-35) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4e-256) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 7.5e-132) tmp = Float64(Float64(Float64(B * Float64(Float64(Float64(F / t_1) * -0.16666666666666666) + Float64(x * 0.3333333333333333))) - Float64(F / Float64(B * t_1))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = F + (1.0 / F); tmp = 0.0; if (F <= -8.5e-35) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4e-256) tmp = (-1.0 / B) - t_0; elseif (F <= 7.5e-132) tmp = ((B * (((F / t_1) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_1))) - (x / B); else tmp = (1.0 / 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[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.5e-35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4e-256], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.5e-132], N[(N[(N[(B * N[(N[(N[(F / t$95$1), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(F / N[(B * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := F + \frac{1}{F}\\
\mathbf{if}\;F \leq -8.5 \cdot 10^{-35}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-256}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-132}:\\
\;\;\;\;\left(B \cdot \left(\frac{F}{t_1} \cdot -0.16666666666666666 + x \cdot 0.3333333333333333\right) - \frac{F}{B \cdot t_1}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -8.5000000000000001e-35Initial program 53.9%
Taylor expanded in F around -inf 97.1%
Taylor expanded in B around 0 77.0%
if -8.5000000000000001e-35 < F < -3.99999999999999991e-256Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.7%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around -inf 43.8%
Taylor expanded in B around 0 54.3%
if -3.99999999999999991e-256 < F < 7.49999999999999989e-132Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.7%
Taylor expanded in x around 0 99.8%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u89.1%
expm1-udef75.1%
associate-*r/75.1%
sqrt-div75.1%
metadata-eval75.1%
un-div-inv75.1%
Applied egg-rr75.1%
expm1-def89.2%
expm1-log1p99.8%
Simplified99.8%
Taylor expanded in F around -inf 83.7%
mul-1-neg83.7%
Simplified83.7%
Taylor expanded in B around 0 62.4%
if 7.49999999999999989e-132 < F Initial program 69.6%
+-commutative69.6%
unsub-neg69.6%
associate-*l/78.3%
associate-*r/78.2%
*-commutative78.2%
Simplified78.3%
Taylor expanded in F around inf 82.1%
*-commutative82.1%
associate-/r*82.2%
Simplified82.2%
Taylor expanded in B around 0 62.9%
Final simplification66.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ F (/ 1.0 F))))
(if (or (<= B -0.005) (not (<= B 31.0)))
(- (/ -1.0 B) (/ x (tan B)))
(-
(-
(* B (+ (* (/ F t_0) -0.16666666666666666) (* x 0.3333333333333333)))
(/ F (* B t_0)))
(/ x B)))))
double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double tmp;
if ((B <= -0.005) || !(B <= 31.0)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = ((B * (((F / t_0) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_0))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = f + (1.0d0 / f)
if ((b <= (-0.005d0)) .or. (.not. (b <= 31.0d0))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = ((b * (((f / t_0) * (-0.16666666666666666d0)) + (x * 0.3333333333333333d0))) - (f / (b * t_0))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double tmp;
if ((B <= -0.005) || !(B <= 31.0)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((B * (((F / t_0) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_0))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F + (1.0 / F) tmp = 0 if (B <= -0.005) or not (B <= 31.0): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = ((B * (((F / t_0) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_0))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F + Float64(1.0 / F)) tmp = 0.0 if ((B <= -0.005) || !(B <= 31.0)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(B * Float64(Float64(Float64(F / t_0) * -0.16666666666666666) + Float64(x * 0.3333333333333333))) - Float64(F / Float64(B * t_0))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F + (1.0 / F); tmp = 0.0; if ((B <= -0.005) || ~((B <= 31.0))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = ((B * (((F / t_0) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_0))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[B, -0.005], N[Not[LessEqual[B, 31.0]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(B * N[(N[(N[(F / t$95$0), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F + \frac{1}{F}\\
\mathbf{if}\;B \leq -0.005 \lor \neg \left(B \leq 31\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\left(B \cdot \left(\frac{F}{t_0} \cdot -0.16666666666666666 + x \cdot 0.3333333333333333\right) - \frac{F}{B \cdot t_0}\right) - \frac{x}{B}\\
\end{array}
\end{array}
if B < -0.0050000000000000001 or 31 < B Initial program 81.2%
+-commutative81.2%
unsub-neg81.2%
associate-*l/81.2%
associate-*r/81.1%
*-commutative81.1%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.3%
*-lft-identity81.3%
unpow281.3%
fma-udef81.3%
Simplified81.3%
Taylor expanded in F around -inf 53.8%
Taylor expanded in B around 0 43.1%
if -0.0050000000000000001 < B < 31Initial program 67.2%
+-commutative67.2%
unsub-neg67.2%
associate-*l/84.4%
associate-*r/84.3%
*-commutative84.3%
Simplified84.5%
Taylor expanded in x around 0 84.5%
associate-*l/84.5%
*-lft-identity84.5%
unpow284.5%
fma-udef84.5%
Simplified84.5%
expm1-log1p-u55.4%
expm1-udef52.1%
associate-*r/52.1%
sqrt-div52.1%
metadata-eval52.1%
un-div-inv52.1%
Applied egg-rr52.1%
expm1-def55.4%
expm1-log1p84.6%
Simplified84.6%
Taylor expanded in F around -inf 75.5%
mul-1-neg75.5%
Simplified75.5%
Taylor expanded in B around 0 75.4%
Final simplification59.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ F (/ 1.0 F))) (t_1 (/ x (tan B))))
(if (<= F -2.8e-256)
(- (/ -1.0 B) t_1)
(if (<= F 5.1e-132)
(-
(-
(* B (+ (* (/ F t_0) -0.16666666666666666) (* x 0.3333333333333333)))
(/ F (* B t_0)))
(/ x B))
(- (/ 1.0 B) t_1)))))
double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double t_1 = x / tan(B);
double tmp;
if (F <= -2.8e-256) {
tmp = (-1.0 / B) - t_1;
} else if (F <= 5.1e-132) {
tmp = ((B * (((F / t_0) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_0))) - (x / B);
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f + (1.0d0 / f)
t_1 = x / tan(b)
if (f <= (-2.8d-256)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= 5.1d-132) then
tmp = ((b * (((f / t_0) * (-0.16666666666666666d0)) + (x * 0.3333333333333333d0))) - (f / (b * t_0))) - (x / b)
else
tmp = (1.0d0 / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.8e-256) {
tmp = (-1.0 / B) - t_1;
} else if (F <= 5.1e-132) {
tmp = ((B * (((F / t_0) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_0))) - (x / B);
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F + (1.0 / F) t_1 = x / math.tan(B) tmp = 0 if F <= -2.8e-256: tmp = (-1.0 / B) - t_1 elif F <= 5.1e-132: tmp = ((B * (((F / t_0) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_0))) - (x / B) else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F + Float64(1.0 / F)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.8e-256) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= 5.1e-132) tmp = Float64(Float64(Float64(B * Float64(Float64(Float64(F / t_0) * -0.16666666666666666) + Float64(x * 0.3333333333333333))) - Float64(F / Float64(B * t_0))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F + (1.0 / F); t_1 = x / tan(B); tmp = 0.0; if (F <= -2.8e-256) tmp = (-1.0 / B) - t_1; elseif (F <= 5.1e-132) tmp = ((B * (((F / t_0) * -0.16666666666666666) + (x * 0.3333333333333333))) - (F / (B * t_0))) - (x / B); else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e-256], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 5.1e-132], N[(N[(N[(B * N[(N[(N[(F / t$95$0), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F + \frac{1}{F}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{-256}:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq 5.1 \cdot 10^{-132}:\\
\;\;\;\;\left(B \cdot \left(\frac{F}{t_0} \cdot -0.16666666666666666 + x \cdot 0.3333333333333333\right) - \frac{F}{B \cdot t_0}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\end{array}
\end{array}
if F < -2.80000000000000023e-256Initial program 66.7%
+-commutative66.7%
unsub-neg66.7%
associate-*l/79.7%
associate-*r/79.6%
*-commutative79.6%
Simplified79.7%
Taylor expanded in x around 0 79.7%
associate-*l/79.7%
*-lft-identity79.7%
unpow279.7%
fma-udef79.7%
Simplified79.7%
Taylor expanded in F around -inf 82.2%
Taylor expanded in B around 0 66.0%
if -2.80000000000000023e-256 < F < 5.10000000000000005e-132Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.7%
Taylor expanded in x around 0 99.8%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
expm1-log1p-u89.1%
expm1-udef75.1%
associate-*r/75.1%
sqrt-div75.1%
metadata-eval75.1%
un-div-inv75.1%
Applied egg-rr75.1%
expm1-def89.2%
expm1-log1p99.8%
Simplified99.8%
Taylor expanded in F around -inf 83.7%
mul-1-neg83.7%
Simplified83.7%
Taylor expanded in B around 0 62.4%
if 5.10000000000000005e-132 < F Initial program 69.6%
+-commutative69.6%
unsub-neg69.6%
associate-*l/78.3%
associate-*r/78.2%
*-commutative78.2%
Simplified78.3%
Taylor expanded in F around inf 82.1%
*-commutative82.1%
associate-/r*82.2%
Simplified82.2%
Taylor expanded in B around 0 62.9%
Final simplification64.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.15e-86)
(/ (- -1.0 x) B)
(if (<= F 1.25e-127)
(/ (- x) B)
(+ (* 0.3333333333333333 (* B x)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-86) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.25e-127) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.15d-86)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.25d-127) then
tmp = -x / b
else
tmp = (0.3333333333333333d0 * (b * x)) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-86) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.25e-127) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-86: tmp = (-1.0 - x) / B elif F <= 1.25e-127: tmp = -x / B else: tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-86) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.25e-127) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-86) tmp = (-1.0 - x) / B; elseif (F <= 1.25e-127) tmp = -x / B; else tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-86], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.25e-127], N[((-x) / B), $MachinePrecision], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-127}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.14999999999999998e-86Initial program 56.5%
Taylor expanded in F around -inf 92.9%
Taylor expanded in B around 0 48.5%
associate-*r/48.5%
distribute-lft-in48.5%
metadata-eval48.5%
neg-mul-148.5%
Simplified48.5%
if -1.14999999999999998e-86 < F < 1.2499999999999999e-127Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in F around inf 24.4%
*-commutative24.4%
associate-/r*24.4%
Simplified24.4%
Taylor expanded in B around 0 30.7%
Taylor expanded in x around inf 55.1%
mul-1-neg55.1%
distribute-neg-frac55.1%
Simplified55.1%
if 1.2499999999999999e-127 < F Initial program 69.6%
+-commutative69.6%
unsub-neg69.6%
associate-*l/78.3%
associate-*r/78.2%
*-commutative78.2%
Simplified78.3%
Taylor expanded in F around inf 82.1%
*-commutative82.1%
associate-/r*82.2%
Simplified82.2%
Taylor expanded in B around 0 62.9%
Taylor expanded in B around 0 44.4%
associate--l+44.4%
div-sub44.4%
Simplified44.4%
Final simplification48.9%
(FPCore (F B x) :precision binary64 (if (<= F 7.2e-129) (/ (- (/ (- F) (+ F (/ 1.0 F))) x) B) (+ (* 0.3333333333333333 (* B x)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= 7.2e-129) {
tmp = ((-F / (F + (1.0 / F))) - x) / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 7.2d-129) then
tmp = ((-f / (f + (1.0d0 / f))) - x) / b
else
tmp = (0.3333333333333333d0 * (b * x)) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 7.2e-129) {
tmp = ((-F / (F + (1.0 / F))) - x) / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 7.2e-129: tmp = ((-F / (F + (1.0 / F))) - x) / B else: tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 7.2e-129) tmp = Float64(Float64(Float64(Float64(-F) / Float64(F + Float64(1.0 / F))) - x) / B); else tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 7.2e-129) tmp = ((-F / (F + (1.0 / F))) - x) / B; else tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 7.2e-129], N[(N[(N[((-F) / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 7.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{\frac{-F}{F + \frac{1}{F}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 7.2e-129Initial program 76.4%
+-commutative76.4%
unsub-neg76.4%
associate-*l/85.5%
associate-*r/85.4%
*-commutative85.4%
Simplified85.6%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
expm1-log1p-u66.4%
expm1-udef57.5%
associate-*r/57.5%
sqrt-div57.5%
metadata-eval57.5%
un-div-inv57.5%
Applied egg-rr57.5%
expm1-def66.4%
expm1-log1p85.7%
Simplified85.7%
Taylor expanded in F around -inf 87.9%
mul-1-neg87.9%
Simplified87.9%
Taylor expanded in B around 0 51.5%
mul-1-neg51.5%
distribute-neg-frac51.5%
Simplified51.5%
if 7.2e-129 < F Initial program 69.6%
+-commutative69.6%
unsub-neg69.6%
associate-*l/78.3%
associate-*r/78.2%
*-commutative78.2%
Simplified78.3%
Taylor expanded in F around inf 82.1%
*-commutative82.1%
associate-/r*82.2%
Simplified82.2%
Taylor expanded in B around 0 62.9%
Taylor expanded in B around 0 44.4%
associate--l+44.4%
div-sub44.4%
Simplified44.4%
Final simplification48.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.15e-86) (/ (- -1.0 x) B) (if (<= F 1.1e-127) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-86) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.1e-127) {
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.15d-86)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.1d-127) 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.15e-86) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.1e-127) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-86: tmp = (-1.0 - x) / B elif F <= 1.1e-127: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-86) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.1e-127) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-86) tmp = (-1.0 - x) / B; elseif (F <= 1.1e-127) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-86], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.1e-127], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-127}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.14999999999999998e-86Initial program 56.5%
Taylor expanded in F around -inf 92.9%
Taylor expanded in B around 0 48.5%
associate-*r/48.5%
distribute-lft-in48.5%
metadata-eval48.5%
neg-mul-148.5%
Simplified48.5%
if -1.14999999999999998e-86 < F < 1.1000000000000001e-127Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in F around inf 24.4%
*-commutative24.4%
associate-/r*24.4%
Simplified24.4%
Taylor expanded in B around 0 30.7%
Taylor expanded in x around inf 55.1%
mul-1-neg55.1%
distribute-neg-frac55.1%
Simplified55.1%
if 1.1000000000000001e-127 < F Initial program 69.6%
+-commutative69.6%
unsub-neg69.6%
associate-*l/78.3%
associate-*r/78.2%
*-commutative78.2%
Simplified78.3%
Taylor expanded in F around inf 82.1%
*-commutative82.1%
associate-/r*82.2%
Simplified82.2%
Taylor expanded in B around 0 43.3%
Final simplification48.5%
(FPCore (F B x) :precision binary64 (if (<= F 9.8e-129) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 9.8e-129) {
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 <= 9.8d-129) 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 <= 9.8e-129) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 9.8e-129: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 9.8e-129) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 9.8e-129) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 9.8e-129], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 9.8 \cdot 10^{-129}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 9.80000000000000004e-129Initial program 76.4%
+-commutative76.4%
unsub-neg76.4%
associate-*l/85.5%
associate-*r/85.4%
*-commutative85.4%
Simplified85.6%
Taylor expanded in F around inf 34.0%
*-commutative34.0%
associate-/r*34.0%
Simplified34.0%
Taylor expanded in B around 0 26.8%
Taylor expanded in x around inf 38.5%
mul-1-neg38.5%
distribute-neg-frac38.5%
Simplified38.5%
if 9.80000000000000004e-129 < F Initial program 69.6%
+-commutative69.6%
unsub-neg69.6%
associate-*l/78.3%
associate-*r/78.2%
*-commutative78.2%
Simplified78.3%
Taylor expanded in F around inf 82.1%
*-commutative82.1%
associate-/r*82.2%
Simplified82.2%
Taylor expanded in B around 0 43.3%
Final simplification40.3%
(FPCore (F B x) :precision binary64 (if (<= F 1.35e+252) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.35e+252) {
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 <= 1.35d+252) 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 <= 1.35e+252) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.35e+252: tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.35e+252) tmp = Float64(Float64(-x) / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.35e+252) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.35e+252], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.35 \cdot 10^{+252}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1.35000000000000005e252Initial program 78.2%
+-commutative78.2%
unsub-neg78.2%
associate-*l/87.3%
associate-*r/87.2%
*-commutative87.2%
Simplified87.3%
Taylor expanded in F around inf 48.2%
*-commutative48.2%
associate-/r*48.3%
Simplified48.3%
Taylor expanded in B around 0 31.6%
Taylor expanded in x around inf 34.5%
mul-1-neg34.5%
distribute-neg-frac34.5%
Simplified34.5%
if 1.35000000000000005e252 < F Initial program 13.6%
+-commutative13.6%
unsub-neg13.6%
associate-*l/21.0%
associate-*r/21.0%
*-commutative21.0%
Simplified21.0%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 50.9%
Taylor expanded in x around 0 45.4%
Final simplification35.2%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 73.9%
+-commutative73.9%
unsub-neg73.9%
associate-*l/82.9%
associate-*r/82.8%
*-commutative82.8%
Simplified82.9%
Taylor expanded in F around inf 51.7%
*-commutative51.7%
associate-/r*51.7%
Simplified51.7%
Taylor expanded in B around 0 32.8%
Taylor expanded in x around 0 10.1%
Final simplification10.1%
herbie shell --seed 2023255
(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))))))