
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(if (<= F -5e+25)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 200000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e+25) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 200000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5d+25)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 200000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5e+25) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 200000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e+25: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 200000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e+25) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e+25) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 200000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{+25}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.00000000000000024e25Initial program 58.0%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u51.6%
expm1-udef51.5%
div-inv51.5%
neg-mul-151.5%
fma-def51.5%
Applied egg-rr51.5%
expm1-def51.6%
expm1-log1p99.9%
rem-log-exp40.9%
fma-udef40.9%
neg-mul-140.9%
prod-exp34.2%
*-commutative34.2%
prod-exp40.9%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -5.00000000000000024e25 < F < 2e8Initial program 99.5%
Taylor expanded in x around 0 99.6%
if 2e8 < F Initial program 51.3%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -9.5e+24)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 340000000.0)
(+ (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -9.5e+24) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 340000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + t_0;
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-9.5d+24)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 340000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) + t_0
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -9.5e+24) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 340000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + t_0;
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -9.5e+24: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 340000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + t_0 else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -9.5e+24) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 340000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) + t_0); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -9.5e+24) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 340000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) + t_0; else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 340000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 340000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} + t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -9.5000000000000001e24Initial program 58.0%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u51.6%
expm1-udef51.5%
div-inv51.5%
neg-mul-151.5%
fma-def51.5%
Applied egg-rr51.5%
expm1-def51.6%
expm1-log1p99.9%
rem-log-exp40.9%
fma-udef40.9%
neg-mul-140.9%
prod-exp34.2%
*-commutative34.2%
prod-exp40.9%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -9.5000000000000001e24 < F < 3.4e8Initial program 99.5%
if 3.4e8 < F Initial program 51.3%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -7.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.4)
(+ t_0 (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -7.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.4) {
tmp = t_0 + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-7.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.4d0) then
tmp = t_0 + ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -7.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.4) {
tmp = t_0 + ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -7.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.4: tmp = t_0 + ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -7.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.4) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -7.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.4) tmp = t_0 + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -7:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7Initial program 60.3%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u52.8%
expm1-udef52.7%
div-inv52.7%
neg-mul-152.7%
fma-def52.7%
Applied egg-rr52.7%
expm1-def52.8%
expm1-log1p99.9%
rem-log-exp41.5%
fma-udef41.5%
neg-mul-141.5%
prod-exp35.2%
*-commutative35.2%
prod-exp41.5%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -7 < F < 1.3999999999999999Initial program 99.5%
Taylor expanded in F around 0 98.7%
if 1.3999999999999999 < F Initial program 51.9%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -7.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.45)
(+ t_0 (/ 1.0 (* (/ (sin B) F) (sqrt (+ 2.0 (* x 2.0))))))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -7.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.45) {
tmp = t_0 + (1.0 / ((sin(B) / F) * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-7.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.45d0) then
tmp = t_0 + (1.0d0 / ((sin(b) / f) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -7.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.45) {
tmp = t_0 + (1.0 / ((Math.sin(B) / F) * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -7.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.45: tmp = t_0 + (1.0 / ((math.sin(B) / F) * math.sqrt((2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -7.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.45) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(sin(B) / F) * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -7.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.45) tmp = t_0 + (1.0 / ((sin(B) / F) * sqrt((2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45], N[(t$95$0 + N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -7:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B}{F} \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7Initial program 60.3%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u52.8%
expm1-udef52.7%
div-inv52.7%
neg-mul-152.7%
fma-def52.7%
Applied egg-rr52.7%
expm1-def52.8%
expm1-log1p99.9%
rem-log-exp41.5%
fma-udef41.5%
neg-mul-141.5%
prod-exp35.2%
*-commutative35.2%
prod-exp41.5%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -7 < F < 1.44999999999999996Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 98.8%
if 1.44999999999999996 < F Initial program 51.9%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7Initial program 60.3%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u52.8%
expm1-udef52.7%
div-inv52.7%
neg-mul-152.7%
fma-def52.7%
Applied egg-rr52.7%
expm1-def52.8%
expm1-log1p99.9%
rem-log-exp41.5%
fma-udef41.5%
neg-mul-141.5%
prod-exp35.2%
*-commutative35.2%
prod-exp41.5%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -7 < F < 1.3999999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 98.7%
if 1.3999999999999999 < F Initial program 51.9%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x B))))
(if (<= F -6.8)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -3.2e-73)
t_1
(if (<= F 3e-144)
(+ t_0 (/ 1.0 (/ (* B (sqrt 2.0)) F)))
(if (<= F 42000000.0) t_1 (+ t_0 (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -6.8) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -3.2e-73) {
tmp = t_1;
} else if (F <= 3e-144) {
tmp = t_0 + (1.0 / ((B * sqrt(2.0)) / F));
} else if (F <= 42000000.0) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
if (f <= (-6.8d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-3.2d-73)) then
tmp = t_1
else if (f <= 3d-144) then
tmp = t_0 + (1.0d0 / ((b * sqrt(2.0d0)) / f))
else if (f <= 42000000.0d0) then
tmp = t_1
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -6.8) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -3.2e-73) {
tmp = t_1;
} else if (F <= 3e-144) {
tmp = t_0 + (1.0 / ((B * Math.sqrt(2.0)) / F));
} else if (F <= 42000000.0) {
tmp = t_1;
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) tmp = 0 if F <= -6.8: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -3.2e-73: tmp = t_1 elif F <= 3e-144: tmp = t_0 + (1.0 / ((B * math.sqrt(2.0)) / F)) elif F <= 42000000.0: tmp = t_1 else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) tmp = 0.0 if (F <= -6.8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -3.2e-73) tmp = t_1; elseif (F <= 3e-144) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(B * sqrt(2.0)) / F))); elseif (F <= 42000000.0) tmp = t_1; else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); tmp = 0.0; if (F <= -6.8) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -3.2e-73) tmp = t_1; elseif (F <= 3e-144) tmp = t_0 + (1.0 / ((B * sqrt(2.0)) / F)); elseif (F <= 42000000.0) tmp = t_1; else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.2e-73], t$95$1, If[LessEqual[F, 3e-144], N[(t$95$0 + N[(1.0 / N[(N[(B * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 42000000.0], t$95$1, N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{if}\;F \leq -6.8:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-144}:\\
\;\;\;\;t_0 + \frac{1}{\frac{B \cdot \sqrt{2}}{F}}\\
\mathbf{elif}\;F \leq 42000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -6.79999999999999982Initial program 60.8%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u52.1%
expm1-udef52.0%
div-inv52.0%
neg-mul-152.0%
fma-def52.0%
Applied egg-rr52.0%
expm1-def52.1%
expm1-log1p99.9%
rem-log-exp41.0%
fma-udef41.0%
neg-mul-141.0%
prod-exp34.8%
*-commutative34.8%
prod-exp41.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -6.79999999999999982 < F < -3.19999999999999986e-73 or 2.9999999999999999e-144 < F < 4.2e7Initial program 99.5%
Taylor expanded in B around 0 92.7%
if -3.19999999999999986e-73 < F < 2.9999999999999999e-144Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 92.7%
Taylor expanded in x around 0 92.7%
if 4.2e7 < F Initial program 51.3%
Taylor expanded in F around inf 99.7%
Final simplification96.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -1.9e+18)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 4.6e-140)
(+ t_0 (* t_1 (/ F B)))
(if (<= F 42000000.0)
(- (* (/ F (sin B)) t_1) (/ x B))
(+ t_0 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.9e+18) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 4.6e-140) {
tmp = t_0 + (t_1 * (F / B));
} else if (F <= 42000000.0) {
tmp = ((F / sin(B)) * t_1) - (x / B);
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-1.9d+18)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 4.6d-140) then
tmp = t_0 + (t_1 * (f / b))
else if (f <= 42000000.0d0) then
tmp = ((f / sin(b)) * t_1) - (x / b)
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double t_1 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.9e+18) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 4.6e-140) {
tmp = t_0 + (t_1 * (F / B));
} else if (F <= 42000000.0) {
tmp = ((F / Math.sin(B)) * t_1) - (x / B);
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -1.9e+18: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 4.6e-140: tmp = t_0 + (t_1 * (F / B)) elif F <= 42000000.0: tmp = ((F / math.sin(B)) * t_1) - (x / B) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -1.9e+18) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 4.6e-140) tmp = Float64(t_0 + Float64(t_1 * Float64(F / B))); elseif (F <= 42000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_1) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -1.9e+18) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 4.6e-140) tmp = t_0 + (t_1 * (F / B)); elseif (F <= 42000000.0) tmp = ((F / sin(B)) * t_1) - (x / B); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -1.9e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.6e-140], N[(t$95$0 + N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 42000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-140}:\\
\;\;\;\;t_0 + t_1 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 42000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_1 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.9e18Initial program 59.7%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u53.5%
expm1-udef53.5%
div-inv53.5%
neg-mul-153.5%
fma-def53.5%
Applied egg-rr53.5%
expm1-def53.5%
expm1-log1p99.9%
rem-log-exp42.0%
fma-udef42.0%
neg-mul-142.0%
prod-exp35.6%
*-commutative35.6%
prod-exp42.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -1.9e18 < F < 4.6000000000000002e-140Initial program 99.5%
Taylor expanded in B around 0 89.3%
if 4.6000000000000002e-140 < F < 4.2e7Initial program 99.6%
Taylor expanded in B around 0 89.9%
if 4.2e7 < F Initial program 51.3%
Taylor expanded in F around inf 99.7%
Final simplification95.3%
(FPCore (F B x)
:precision binary64
(if (<= F -0.006)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.55e-75)
(/ 1.0 (/ (sin B) (* F (sqrt 0.5))))
(if (<= F 4.2e-50)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.000195)
(* (/ F (sin B)) (sqrt 0.5))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.006) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.55e-75) {
tmp = 1.0 / (sin(B) / (F * sqrt(0.5)));
} else if (F <= 4.2e-50) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.000195) {
tmp = (F / sin(B)) * sqrt(0.5);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.006d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.55d-75)) then
tmp = 1.0d0 / (sin(b) / (f * sqrt(0.5d0)))
else if (f <= 4.2d-50) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.000195d0) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.006) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.55e-75) {
tmp = 1.0 / (Math.sin(B) / (F * Math.sqrt(0.5)));
} else if (F <= 4.2e-50) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.000195) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.006: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.55e-75: tmp = 1.0 / (math.sin(B) / (F * math.sqrt(0.5))) elif F <= 4.2e-50: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.000195: tmp = (F / math.sin(B)) * math.sqrt(0.5) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.006) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.55e-75) tmp = Float64(1.0 / Float64(sin(B) / Float64(F * sqrt(0.5)))); elseif (F <= 4.2e-50) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.000195) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.006) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.55e-75) tmp = 1.0 / (sin(B) / (F * sqrt(0.5))); elseif (F <= 4.2e-50) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.000195) tmp = (F / sin(B)) * sqrt(0.5); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.006], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-75], N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-50], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.000195], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.006:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-75}:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.000195:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.0060000000000000001Initial program 60.8%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u52.1%
expm1-udef52.0%
div-inv52.0%
neg-mul-152.0%
fma-def52.0%
Applied egg-rr52.0%
expm1-def52.1%
expm1-log1p99.9%
rem-log-exp41.0%
fma-udef41.0%
neg-mul-141.0%
prod-exp34.8%
*-commutative34.8%
prod-exp41.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -0.0060000000000000001 < F < -1.55000000000000003e-75Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.3%
Taylor expanded in F around 0 93.8%
Taylor expanded in x around 0 83.0%
associate-/l*83.0%
Simplified83.0%
clear-num83.2%
inv-pow83.2%
Applied egg-rr83.2%
unpow-183.2%
associate-/l/83.4%
Simplified83.4%
if -1.55000000000000003e-75 < F < 4.2000000000000002e-50Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 88.5%
Taylor expanded in x around inf 80.9%
associate-*r/80.9%
*-commutative80.9%
associate-*r*80.9%
neg-mul-180.9%
Simplified80.9%
if 4.2000000000000002e-50 < F < 1.94999999999999996e-4Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.4%
associate-*r/99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in F around 0 92.0%
Taylor expanded in F around inf 92.6%
Taylor expanded in x around 0 92.6%
if 1.94999999999999996e-4 < F Initial program 51.9%
Taylor expanded in F around inf 99.7%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -7.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 0.108)
(+ t_0 (/ 1.0 (/ (* B (sqrt 2.0)) F)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -7.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 0.108) {
tmp = t_0 + (1.0 / ((B * sqrt(2.0)) / F));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-7.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 0.108d0) then
tmp = t_0 + (1.0d0 / ((b * sqrt(2.0d0)) / f))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -7.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 0.108) {
tmp = t_0 + (1.0 / ((B * Math.sqrt(2.0)) / F));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -7.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 0.108: tmp = t_0 + (1.0 / ((B * math.sqrt(2.0)) / F)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -7.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 0.108) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(B * sqrt(2.0)) / F))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -7.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 0.108) tmp = t_0 + (1.0 / ((B * sqrt(2.0)) / F)); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.108], N[(t$95$0 + N[(1.0 / N[(N[(B * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -7:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.108:\\
\;\;\;\;t_0 + \frac{1}{\frac{B \cdot \sqrt{2}}{F}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7Initial program 60.3%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u52.8%
expm1-udef52.7%
div-inv52.7%
neg-mul-152.7%
fma-def52.7%
Applied egg-rr52.7%
expm1-def52.8%
expm1-log1p99.9%
rem-log-exp41.5%
fma-udef41.5%
neg-mul-141.5%
prod-exp35.2%
*-commutative35.2%
prod-exp41.5%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -7 < F < 0.107999999999999999Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 98.7%
Taylor expanded in B around 0 84.0%
Taylor expanded in x around 0 84.0%
if 0.107999999999999999 < F Initial program 51.9%
Taylor expanded in F around inf 99.7%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5))))
(if (<= F -0.0285)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.8e-78)
t_0
(if (<= F 9.2e-58)
(/ (- (cos B)) (/ (sin B) x))
(if (<= F 0.00039) t_0 (- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double tmp;
if (F <= -0.0285) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.8e-78) {
tmp = t_0;
} else if (F <= 9.2e-58) {
tmp = -cos(B) / (sin(B) / x);
} else if (F <= 0.00039) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt(0.5d0)
if (f <= (-0.0285d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.8d-78)) then
tmp = t_0
else if (f <= 9.2d-58) then
tmp = -cos(b) / (sin(b) / x)
else if (f <= 0.00039d0) then
tmp = t_0
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(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.sqrt(0.5);
double tmp;
if (F <= -0.0285) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.8e-78) {
tmp = t_0;
} else if (F <= 9.2e-58) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else if (F <= 0.00039) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) tmp = 0 if F <= -0.0285: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.8e-78: tmp = t_0 elif F <= 9.2e-58: tmp = -math.cos(B) / (math.sin(B) / x) elif F <= 0.00039: tmp = t_0 else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) tmp = 0.0 if (F <= -0.0285) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.8e-78) tmp = t_0; elseif (F <= 9.2e-58) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); elseif (F <= 0.00039) tmp = t_0; else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); tmp = 0.0; if (F <= -0.0285) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.8e-78) tmp = t_0; elseif (F <= 9.2e-58) tmp = -cos(B) / (sin(B) / x); elseif (F <= 0.00039) tmp = t_0; else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0285], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.8e-78], t$95$0, If[LessEqual[F, 9.2e-58], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00039], t$95$0, N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{if}\;F \leq -0.0285:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-58}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq 0.00039:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.028500000000000001Initial program 60.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 78.4%
if -0.028500000000000001 < F < -4.79999999999999999e-78 or 9.1999999999999995e-58 < F < 3.89999999999999993e-4Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.2%
associate-*r/99.1%
*-commutative99.1%
Simplified99.2%
Taylor expanded in F around 0 93.2%
Taylor expanded in F around inf 86.4%
Taylor expanded in x around 0 86.5%
if -4.79999999999999999e-78 < F < 9.1999999999999995e-58Initial program 99.5%
Taylor expanded in F around -inf 42.2%
Taylor expanded in x around inf 80.9%
mul-1-neg80.9%
associate-/l*80.7%
Simplified80.7%
if 3.89999999999999993e-4 < F Initial program 51.9%
+-commutative51.9%
unsub-neg51.9%
associate-*l/69.2%
associate-*r/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 78.6%
Final simplification79.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5))))
(if (<= F -0.086)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.95e-81)
t_0
(if (<= F 1.6e-56)
(* x (- (/ (cos B) (sin B))))
(if (<= F 0.057) t_0 (- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double tmp;
if (F <= -0.086) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.95e-81) {
tmp = t_0;
} else if (F <= 1.6e-56) {
tmp = x * -(cos(B) / sin(B));
} else if (F <= 0.057) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt(0.5d0)
if (f <= (-0.086d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.95d-81)) then
tmp = t_0
else if (f <= 1.6d-56) then
tmp = x * -(cos(b) / sin(b))
else if (f <= 0.057d0) then
tmp = t_0
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(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.sqrt(0.5);
double tmp;
if (F <= -0.086) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.95e-81) {
tmp = t_0;
} else if (F <= 1.6e-56) {
tmp = x * -(Math.cos(B) / Math.sin(B));
} else if (F <= 0.057) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) tmp = 0 if F <= -0.086: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.95e-81: tmp = t_0 elif F <= 1.6e-56: tmp = x * -(math.cos(B) / math.sin(B)) elif F <= 0.057: tmp = t_0 else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) tmp = 0.0 if (F <= -0.086) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.95e-81) tmp = t_0; elseif (F <= 1.6e-56) tmp = Float64(x * Float64(-Float64(cos(B) / sin(B)))); elseif (F <= 0.057) tmp = t_0; else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); tmp = 0.0; if (F <= -0.086) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.95e-81) tmp = t_0; elseif (F <= 1.6e-56) tmp = x * -(cos(B) / sin(B)); elseif (F <= 0.057) tmp = t_0; else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.086], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.95e-81], t$95$0, If[LessEqual[F, 1.6e-56], N[(x * (-N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.057], t$95$0, N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{if}\;F \leq -0.086:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-81}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-56}:\\
\;\;\;\;x \cdot \left(-\frac{\cos B}{\sin B}\right)\\
\mathbf{elif}\;F \leq 0.057:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.085999999999999993Initial program 60.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 78.4%
if -0.085999999999999993 < F < -1.94999999999999992e-81 or 1.59999999999999993e-56 < F < 0.0570000000000000021Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.2%
associate-*r/99.1%
*-commutative99.1%
Simplified99.2%
Taylor expanded in F around 0 93.2%
Taylor expanded in F around inf 86.4%
Taylor expanded in x around 0 86.5%
if -1.94999999999999992e-81 < F < 1.59999999999999993e-56Initial program 99.5%
Taylor expanded in F around -inf 42.2%
Taylor expanded in x around inf 80.9%
mul-1-neg80.9%
associate-/l*80.7%
associate-/r/80.8%
distribute-rgt-neg-in80.8%
Simplified80.8%
if 0.0570000000000000021 < F Initial program 51.9%
+-commutative51.9%
unsub-neg51.9%
associate-*l/69.2%
associate-*r/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 78.6%
Final simplification79.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5))))
(if (<= F -0.116)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.65e-80)
t_0
(if (<= F 2.1e-51)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 0.000455) t_0 (- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double tmp;
if (F <= -0.116) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.65e-80) {
tmp = t_0;
} else if (F <= 2.1e-51) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 0.000455) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt(0.5d0)
if (f <= (-0.116d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.65d-80)) then
tmp = t_0
else if (f <= 2.1d-51) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 0.000455d0) then
tmp = t_0
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(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.sqrt(0.5);
double tmp;
if (F <= -0.116) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.65e-80) {
tmp = t_0;
} else if (F <= 2.1e-51) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 0.000455) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) tmp = 0 if F <= -0.116: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.65e-80: tmp = t_0 elif F <= 2.1e-51: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 0.000455: tmp = t_0 else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) tmp = 0.0 if (F <= -0.116) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.65e-80) tmp = t_0; elseif (F <= 2.1e-51) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 0.000455) tmp = t_0; else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); tmp = 0.0; if (F <= -0.116) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.65e-80) tmp = t_0; elseif (F <= 2.1e-51) tmp = -x / (sin(B) / cos(B)); elseif (F <= 0.000455) tmp = t_0; else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.116], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.65e-80], t$95$0, If[LessEqual[F, 2.1e-51], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.000455], t$95$0, N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{if}\;F \leq -0.116:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.65 \cdot 10^{-80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-51}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 0.000455:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.116000000000000006Initial program 60.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 78.4%
if -0.116000000000000006 < F < -2.65000000000000013e-80 or 2.10000000000000002e-51 < F < 4.55e-4Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.2%
associate-*r/99.1%
*-commutative99.1%
Simplified99.2%
Taylor expanded in F around 0 93.2%
Taylor expanded in F around inf 86.4%
Taylor expanded in x around 0 86.5%
if -2.65000000000000013e-80 < F < 2.10000000000000002e-51Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around inf 80.9%
mul-1-neg80.9%
*-commutative80.9%
associate-/l*80.9%
distribute-neg-frac80.9%
Simplified80.9%
if 4.55e-4 < F Initial program 51.9%
+-commutative51.9%
unsub-neg51.9%
associate-*l/69.2%
associate-*r/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 78.6%
Final simplification79.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5))))
(if (<= F -0.01)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.2e-74)
t_0
(if (<= F 2.65e-58)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.00085) t_0 (- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double tmp;
if (F <= -0.01) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.2e-74) {
tmp = t_0;
} else if (F <= 2.65e-58) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.00085) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt(0.5d0)
if (f <= (-0.01d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.2d-74)) then
tmp = t_0
else if (f <= 2.65d-58) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.00085d0) then
tmp = t_0
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(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.sqrt(0.5);
double tmp;
if (F <= -0.01) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.2e-74) {
tmp = t_0;
} else if (F <= 2.65e-58) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.00085) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) tmp = 0 if F <= -0.01: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.2e-74: tmp = t_0 elif F <= 2.65e-58: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.00085: tmp = t_0 else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) tmp = 0.0 if (F <= -0.01) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.2e-74) tmp = t_0; elseif (F <= 2.65e-58) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.00085) tmp = t_0; else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); tmp = 0.0; if (F <= -0.01) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.2e-74) tmp = t_0; elseif (F <= 2.65e-58) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.00085) tmp = t_0; else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.01], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.2e-74], t$95$0, If[LessEqual[F, 2.65e-58], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00085], t$95$0, N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{if}\;F \leq -0.01:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-74}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.65 \cdot 10^{-58}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.00085:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.0100000000000000002Initial program 60.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 78.4%
if -0.0100000000000000002 < F < -3.1999999999999999e-74 or 2.6500000000000002e-58 < F < 8.49999999999999953e-4Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.2%
associate-*r/99.1%
*-commutative99.1%
Simplified99.2%
Taylor expanded in F around 0 93.2%
Taylor expanded in F around inf 86.4%
Taylor expanded in x around 0 86.5%
if -3.1999999999999999e-74 < F < 2.6500000000000002e-58Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 88.5%
Taylor expanded in x around inf 80.9%
associate-*r/80.9%
*-commutative80.9%
associate-*r*80.9%
neg-mul-180.9%
Simplified80.9%
if 8.49999999999999953e-4 < F Initial program 51.9%
+-commutative51.9%
unsub-neg51.9%
associate-*l/69.2%
associate-*r/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 78.6%
Final simplification79.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5))) (t_1 (/ x (tan B))))
(if (<= F -0.0021)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.15e-79)
t_0
(if (<= F 1.08e-36)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.00015) t_0 (- (* F (/ 1.0 (* F B))) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.0021) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.15e-79) {
tmp = t_0;
} else if (F <= 1.08e-36) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.00015) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * 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 / sin(b)) * sqrt(0.5d0)
t_1 = x / tan(b)
if (f <= (-0.0021d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.15d-79)) then
tmp = t_0
else if (f <= 1.08d-36) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.00015d0) then
tmp = t_0
else
tmp = (f * (1.0d0 / (f * b))) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.sqrt(0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.0021) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.15e-79) {
tmp = t_0;
} else if (F <= 1.08e-36) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.00015) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -0.0021: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.15e-79: tmp = t_0 elif F <= 1.08e-36: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.00015: tmp = t_0 else: tmp = (F * (1.0 / (F * B))) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0021) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.15e-79) tmp = t_0; elseif (F <= 1.08e-36) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.00015) tmp = t_0; else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.0021) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.15e-79) tmp = t_0; elseif (F <= 1.08e-36) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.00015) tmp = t_0; else tmp = (F * (1.0 / (F * B))) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0021], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.15e-79], t$95$0, If[LessEqual[F, 1.08e-36], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00015], t$95$0, N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0021:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-79}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{-36}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.00015:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t_1\\
\end{array}
\end{array}
if F < -0.00209999999999999987Initial program 60.8%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u52.1%
expm1-udef52.0%
div-inv52.0%
neg-mul-152.0%
fma-def52.0%
Applied egg-rr52.0%
expm1-def52.1%
expm1-log1p99.9%
rem-log-exp41.0%
fma-udef41.0%
neg-mul-141.0%
prod-exp34.8%
*-commutative34.8%
prod-exp41.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -0.00209999999999999987 < F < -1.15000000000000006e-79 or 1.08000000000000006e-36 < F < 1.49999999999999987e-4Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.2%
associate-*r/99.1%
*-commutative99.1%
Simplified99.2%
Taylor expanded in F around 0 93.2%
Taylor expanded in F around inf 86.4%
Taylor expanded in x around 0 86.5%
if -1.15000000000000006e-79 < F < 1.08000000000000006e-36Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 88.5%
Taylor expanded in x around inf 80.9%
associate-*r/80.9%
*-commutative80.9%
associate-*r*80.9%
neg-mul-180.9%
Simplified80.9%
if 1.49999999999999987e-4 < F Initial program 51.9%
+-commutative51.9%
unsub-neg51.9%
associate-*l/69.2%
associate-*r/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 78.6%
Final simplification86.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0019)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.6e-77)
(/ 1.0 (/ (sin B) (* F (sqrt 0.5))))
(if (<= F 1.66e-53)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.0004)
(* (/ F (sin B)) (sqrt 0.5))
(- (* 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 <= -0.0019) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.6e-77) {
tmp = 1.0 / (sin(B) / (F * sqrt(0.5)));
} else if (F <= 1.66e-53) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.0004) {
tmp = (F / sin(B)) * sqrt(0.5);
} 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 <= (-0.0019d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.6d-77)) then
tmp = 1.0d0 / (sin(b) / (f * sqrt(0.5d0)))
else if (f <= 1.66d-53) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.0004d0) then
tmp = (f / sin(b)) * sqrt(0.5d0)
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 <= -0.0019) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.6e-77) {
tmp = 1.0 / (Math.sin(B) / (F * Math.sqrt(0.5)));
} else if (F <= 1.66e-53) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.0004) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} 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 <= -0.0019: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.6e-77: tmp = 1.0 / (math.sin(B) / (F * math.sqrt(0.5))) elif F <= 1.66e-53: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.0004: tmp = (F / math.sin(B)) * math.sqrt(0.5) 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 <= -0.0019) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.6e-77) tmp = Float64(1.0 / Float64(sin(B) / Float64(F * sqrt(0.5)))); elseif (F <= 1.66e-53) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.0004) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); 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 <= -0.0019) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.6e-77) tmp = 1.0 / (sin(B) / (F * sqrt(0.5))); elseif (F <= 1.66e-53) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.0004) tmp = (F / sin(B)) * sqrt(0.5); 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, -0.0019], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.6e-77], N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.66e-53], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0004], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $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 -0.0019:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-77}:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 1.66 \cdot 10^{-53}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.0004:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t_0\\
\end{array}
\end{array}
if F < -0.0019Initial program 60.8%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u52.1%
expm1-udef52.0%
div-inv52.0%
neg-mul-152.0%
fma-def52.0%
Applied egg-rr52.0%
expm1-def52.1%
expm1-log1p99.9%
rem-log-exp41.0%
fma-udef41.0%
neg-mul-141.0%
prod-exp34.8%
*-commutative34.8%
prod-exp41.0%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -0.0019 < F < -1.6e-77Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.3%
Taylor expanded in F around 0 93.8%
Taylor expanded in x around 0 83.0%
associate-/l*83.0%
Simplified83.0%
clear-num83.2%
inv-pow83.2%
Applied egg-rr83.2%
unpow-183.2%
associate-/l/83.4%
Simplified83.4%
if -1.6e-77 < F < 1.66e-53Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 88.5%
Taylor expanded in x around inf 80.9%
associate-*r/80.9%
*-commutative80.9%
associate-*r*80.9%
neg-mul-180.9%
Simplified80.9%
if 1.66e-53 < F < 4.00000000000000019e-4Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.4%
associate-*r/99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in F around 0 92.0%
Taylor expanded in F around inf 92.6%
Taylor expanded in x around 0 92.6%
if 4.00000000000000019e-4 < F Initial program 51.9%
+-commutative51.9%
unsub-neg51.9%
associate-*l/69.2%
associate-*r/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 78.6%
Final simplification86.1%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00305)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.25e-82)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F -1.45e-307)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 4e-161)
(- (/ 1.0 (* (sqrt (+ 2.0 (* x 2.0))) (/ B F))) (/ x B))
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00305) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.25e-82) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= -1.45e-307) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 4e-161) {
tmp = (1.0 / (sqrt((2.0 + (x * 2.0))) * (B / F))) - (x / B);
} else {
tmp = (F * (1.0 / (F * 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 <= (-0.00305d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.25d-82)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= (-1.45d-307)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 4d-161) then
tmp = (1.0d0 / (sqrt((2.0d0 + (x * 2.0d0))) * (b / f))) - (x / b)
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00305) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.25e-82) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= -1.45e-307) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 4e-161) {
tmp = (1.0 / (Math.sqrt((2.0 + (x * 2.0))) * (B / F))) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00305: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.25e-82: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= -1.45e-307: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 4e-161: tmp = (1.0 / (math.sqrt((2.0 + (x * 2.0))) * (B / F))) - (x / B) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00305) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.25e-82) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= -1.45e-307) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 4e-161) tmp = Float64(Float64(1.0 / Float64(sqrt(Float64(2.0 + Float64(x * 2.0))) * Float64(B / F))) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00305) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.25e-82) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= -1.45e-307) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 4e-161) tmp = (1.0 / (sqrt((2.0 + (x * 2.0))) * (B / F))) - (x / B); else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00305], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e-82], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.45e-307], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-161], N[(N[(1.0 / N[(N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00305:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-82}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq -1.45 \cdot 10^{-307}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-161}:\\
\;\;\;\;\frac{1}{\sqrt{2 + x \cdot 2} \cdot \frac{B}{F}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.00305000000000000019Initial program 60.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 78.4%
if -0.00305000000000000019 < F < -1.25e-82Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.1%
associate-*r/99.1%
*-commutative99.1%
Simplified99.3%
Taylor expanded in F around 0 93.8%
Taylor expanded in F around inf 83.0%
Taylor expanded in x around 0 83.0%
if -1.25e-82 < F < -1.45e-307Initial program 99.5%
Taylor expanded in F around -inf 49.2%
Taylor expanded in B around 0 65.1%
if -1.45e-307 < F < 4.00000000000000011e-161Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 93.3%
Taylor expanded in B around 0 67.4%
if 4.00000000000000011e-161 < F Initial program 63.3%
+-commutative63.3%
unsub-neg63.3%
associate-*l/76.5%
associate-*r/76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in F around inf 86.1%
*-commutative86.1%
associate-/r*86.1%
Simplified86.1%
Taylor expanded in B around 0 70.9%
Final simplification72.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.9e+18)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.62e-307)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 9.5e-161)
(- (/ 1.0 (* (sqrt (+ 2.0 (* x 2.0))) (/ B F))) (/ x B))
(- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e+18) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.62e-307) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 9.5e-161) {
tmp = (1.0 / (sqrt((2.0 + (x * 2.0))) * (B / F))) - (x / B);
} else {
tmp = (F * (1.0 / (F * 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.9d+18)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.62d-307)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 9.5d-161) then
tmp = (1.0d0 / (sqrt((2.0d0 + (x * 2.0d0))) * (b / f))) - (x / b)
else
tmp = (f * (1.0d0 / (f * 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.9e+18) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.62e-307) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 9.5e-161) {
tmp = (1.0 / (Math.sqrt((2.0 + (x * 2.0))) * (B / F))) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e+18: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.62e-307: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 9.5e-161: tmp = (1.0 / (math.sqrt((2.0 + (x * 2.0))) * (B / F))) - (x / B) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e+18) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.62e-307) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 9.5e-161) tmp = Float64(Float64(1.0 / Float64(sqrt(Float64(2.0 + Float64(x * 2.0))) * Float64(B / F))) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e+18) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.62e-307) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 9.5e-161) tmp = (1.0 / (sqrt((2.0 + (x * 2.0))) * (B / F))) - (x / B); else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.62e-307], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-161], N[(N[(1.0 / N[(N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.62 \cdot 10^{-307}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-161}:\\
\;\;\;\;\frac{1}{\sqrt{2 + x \cdot 2} \cdot \frac{B}{F}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.9e18Initial program 59.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 79.1%
if -1.9e18 < F < -1.62e-307Initial program 99.5%
Taylor expanded in F around -inf 46.1%
Taylor expanded in B around 0 58.9%
if -1.62e-307 < F < 9.4999999999999996e-161Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 93.3%
Taylor expanded in B around 0 67.4%
if 9.4999999999999996e-161 < F Initial program 63.3%
+-commutative63.3%
unsub-neg63.3%
associate-*l/76.5%
associate-*r/76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in F around inf 86.1%
*-commutative86.1%
associate-/r*86.1%
Simplified86.1%
Taylor expanded in B around 0 70.9%
Final simplification70.1%
(FPCore (F B x)
:precision binary64
(if (<= F -2.7e+18)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.75e-307)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 3.1e-162)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e+18) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.75e-307) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 3.1e-162) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (F * (1.0 / (F * 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 <= (-2.7d+18)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.75d-307)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 3.1d-162) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e+18) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.75e-307) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 3.1e-162) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.7e+18: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.75e-307: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 3.1e-162: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.7e+18) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.75e-307) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 3.1e-162) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.7e+18) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.75e-307) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 3.1e-162) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.7e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.75e-307], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-162], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.7 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.75 \cdot 10^{-307}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-162}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.7e18Initial program 59.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 79.1%
if -2.7e18 < F < -1.7500000000000001e-307Initial program 99.5%
Taylor expanded in F around -inf 46.1%
Taylor expanded in B around 0 58.9%
if -1.7500000000000001e-307 < F < 3.0999999999999999e-162Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 67.2%
if 3.0999999999999999e-162 < F Initial program 63.3%
+-commutative63.3%
unsub-neg63.3%
associate-*l/76.5%
associate-*r/76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in F around inf 86.1%
*-commutative86.1%
associate-/r*86.1%
Simplified86.1%
Taylor expanded in B around 0 70.9%
Final simplification70.1%
(FPCore (F B x)
:precision binary64
(if (<= F -2.5e+18)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.05e-307)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 6.4e-164)
(/ (- x) (sin B))
(- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e+18) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.05e-307) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 6.4e-164) {
tmp = -x / sin(B);
} else {
tmp = (F * (1.0 / (F * 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 <= (-2.5d+18)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.05d-307)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 6.4d-164) then
tmp = -x / sin(b)
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(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 / B);
} else if (F <= -2.05e-307) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 6.4e-164) {
tmp = -x / Math.sin(B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.5e+18: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.05e-307: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 6.4e-164: tmp = -x / math.sin(B) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(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 / B)); elseif (F <= -2.05e-307) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 6.4e-164) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(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 / B); elseif (F <= -2.05e-307) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 6.4e-164) tmp = -x / sin(B); else tmp = (F * (1.0 / (F * B))) - (x / tan(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 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.05e-307], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.4e-164], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[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}{B}\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{-307}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{-164}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.5e18Initial program 59.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 79.1%
if -2.5e18 < F < -2.05000000000000016e-307Initial program 99.5%
Taylor expanded in F around -inf 46.1%
Taylor expanded in B around 0 58.9%
if -2.05000000000000016e-307 < F < 6.4000000000000001e-164Initial program 99.5%
Taylor expanded in F around -inf 25.4%
Taylor expanded in x around inf 81.2%
Taylor expanded in B around 0 56.6%
if 6.4000000000000001e-164 < F Initial program 63.3%
+-commutative63.3%
unsub-neg63.3%
associate-*l/76.5%
associate-*r/76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in F around inf 86.1%
*-commutative86.1%
associate-/r*86.1%
Simplified86.1%
Taylor expanded in B around 0 70.9%
Final simplification68.9%
(FPCore (F B x) :precision binary64 (if (or (<= x -5.2e-46) (not (<= x 1.1e-30))) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)) (- (/ -1.0 (sin B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.2e-46) || !(x <= 1.1e-30)) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else {
tmp = (-1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-5.2d-46)) .or. (.not. (x <= 1.1d-30))) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else
tmp = ((-1.0d0) / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -5.2e-46) || !(x <= 1.1e-30)) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else {
tmp = (-1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.2e-46) or not (x <= 1.1e-30): tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) else: tmp = (-1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.2e-46) || !(x <= 1.1e-30)) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); else tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.2e-46) || ~((x <= 1.1e-30))) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); else tmp = (-1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.2e-46], N[Not[LessEqual[x, 1.1e-30]], $MachinePrecision]], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-46} \lor \neg \left(x \leq 1.1 \cdot 10^{-30}\right):\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if x < -5.2000000000000004e-46 or 1.09999999999999992e-30 < x Initial program 82.3%
Taylor expanded in F around -inf 87.9%
Taylor expanded in B around 0 90.3%
if -5.2000000000000004e-46 < x < 1.09999999999999992e-30Initial program 67.3%
Taylor expanded in F around -inf 30.0%
Taylor expanded in B around 0 30.0%
Final simplification59.2%
(FPCore (F B x) :precision binary64 (if (<= F -6.5e-55) (- (/ -1.0 (sin B)) (/ x B)) (/ (- x) (sin B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-55) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = -x / 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 <= (-6.5d-55)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = -x / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-55) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = -x / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.5e-55: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = -x / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.5e-55) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(-x) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.5e-55) tmp = (-1.0 / sin(B)) - (x / B); else tmp = -x / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.5e-55], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\end{array}
\end{array}
if F < -6.50000000000000006e-55Initial program 63.7%
Taylor expanded in F around -inf 93.0%
Taylor expanded in B around 0 73.2%
if -6.50000000000000006e-55 < F Initial program 79.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in x around inf 63.3%
Taylor expanded in B around 0 35.2%
Final simplification47.2%
(FPCore (F B x) :precision binary64 (if (<= F -4.2e-56) (/ (- -1.0 x) B) (/ (- x) (sin B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-56) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / 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 <= (-4.2d-56)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-56) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e-56: tmp = (-1.0 - x) / B else: tmp = -x / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e-56) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.2e-56) tmp = (-1.0 - x) / B; else tmp = -x / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e-56], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{-56}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\end{array}
\end{array}
if F < -4.20000000000000012e-56Initial program 63.7%
Taylor expanded in F around -inf 93.0%
Taylor expanded in B around 0 46.4%
associate-*r/46.4%
distribute-lft-in46.4%
metadata-eval46.4%
neg-mul-146.4%
Simplified46.4%
Taylor expanded in x around 0 46.4%
sub-neg46.4%
mul-1-neg46.4%
+-commutative46.4%
distribute-neg-frac46.4%
metadata-eval46.4%
sub-neg46.4%
div-sub46.4%
Simplified46.4%
if -4.20000000000000012e-56 < F Initial program 79.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in x around inf 63.3%
Taylor expanded in B around 0 35.2%
Final simplification38.7%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-126) (/ (- -1.0 x) B) (- (/ (- x) B) (* B (* x -0.3333333333333333)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-126) {
tmp = (-1.0 - x) / B;
} else {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.8d-126)) then
tmp = ((-1.0d0) - x) / b
else
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-126) {
tmp = (-1.0 - x) / B;
} else {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-126: tmp = (-1.0 - x) / B else: tmp = (-x / B) - (B * (x * -0.3333333333333333)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-126) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.8e-126) tmp = (-1.0 - x) / B; else tmp = (-x / B) - (B * (x * -0.3333333333333333)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-126], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-126}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -3.7999999999999999e-126Initial program 66.8%
Taylor expanded in F around -inf 90.4%
Taylor expanded in B around 0 44.7%
associate-*r/44.7%
distribute-lft-in44.7%
metadata-eval44.7%
neg-mul-144.7%
Simplified44.7%
Taylor expanded in x around 0 44.7%
sub-neg44.7%
mul-1-neg44.7%
+-commutative44.7%
distribute-neg-frac44.7%
metadata-eval44.7%
sub-neg44.7%
div-sub44.7%
Simplified44.7%
if -3.7999999999999999e-126 < F Initial program 78.7%
Taylor expanded in F around -inf 40.8%
Taylor expanded in x around inf 63.3%
Taylor expanded in B around 0 32.8%
*-commutative32.8%
distribute-rgt-out--32.8%
metadata-eval32.8%
Simplified32.8%
Final simplification36.9%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.1e-134) (not (<= x 2.5e-123))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.1e-134) || !(x <= 2.5e-123)) {
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 ((x <= (-3.1d-134)) .or. (.not. (x <= 2.5d-123))) 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 ((x <= -3.1e-134) || !(x <= 2.5e-123)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.1e-134) or not (x <= 2.5e-123): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.1e-134) || !(x <= 2.5e-123)) 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 ((x <= -3.1e-134) || ~((x <= 2.5e-123))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.1e-134], N[Not[LessEqual[x, 2.5e-123]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{-134} \lor \neg \left(x \leq 2.5 \cdot 10^{-123}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -3.10000000000000006e-134 or 2.50000000000000015e-123 < x Initial program 80.2%
Taylor expanded in F around -inf 70.8%
Taylor expanded in B around 0 33.6%
associate-*r/33.6%
distribute-lft-in33.6%
metadata-eval33.6%
neg-mul-133.6%
Simplified33.6%
Taylor expanded in x around inf 40.9%
associate-*r/40.9%
neg-mul-140.9%
Simplified40.9%
if -3.10000000000000006e-134 < x < 2.50000000000000015e-123Initial program 62.7%
Taylor expanded in F around -inf 30.9%
Taylor expanded in B around 0 18.6%
associate-*r/18.6%
distribute-lft-in18.6%
metadata-eval18.6%
neg-mul-118.6%
Simplified18.6%
Taylor expanded in x around 0 18.6%
Final simplification33.8%
(FPCore (F B x) :precision binary64 (if (<= F -3.2e-74) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-74) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.2d-74)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-74) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.2e-74: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.2e-74) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.2e-74) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.2e-74], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.2 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -3.1999999999999999e-74Initial program 64.9%
Taylor expanded in F around -inf 91.0%
Taylor expanded in B around 0 46.0%
associate-*r/46.0%
distribute-lft-in46.0%
metadata-eval46.0%
neg-mul-146.0%
Simplified46.0%
Taylor expanded in x around 0 46.0%
sub-neg46.0%
mul-1-neg46.0%
+-commutative46.0%
distribute-neg-frac46.0%
metadata-eval46.0%
sub-neg46.0%
div-sub46.0%
Simplified46.0%
if -3.1999999999999999e-74 < F Initial program 79.3%
Taylor expanded in F around -inf 42.0%
Taylor expanded in B around 0 20.4%
associate-*r/20.4%
distribute-lft-in20.4%
metadata-eval20.4%
neg-mul-120.4%
Simplified20.4%
Taylor expanded in x around inf 32.3%
associate-*r/32.3%
neg-mul-132.3%
Simplified32.3%
Final simplification36.8%
(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 74.6%
Taylor expanded in F around -inf 58.0%
Taylor expanded in B around 0 28.8%
associate-*r/28.8%
distribute-lft-in28.8%
metadata-eval28.8%
neg-mul-128.8%
Simplified28.8%
Taylor expanded in x around 0 9.5%
Final simplification9.5%
herbie shell --seed 2023242
(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))))))