
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (PI) (/ angle 180.0)))) (+ (pow (* a (cos t_0)) 2.0) (pow (* b (sin t_0)) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (PI) (/ angle 180.0)))) (+ (pow (* a (cos t_0)) 2.0) (pow (* b (sin t_0)) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* (fma angle_m -0.005555555555555556 0.5) (PI)))
(t_1 (* (fma angle_m -0.005555555555555556 2.0) (PI)))
(t_2 (* (sin t_1) (cos t_0)))
(t_3 (* (cos t_1) (sin t_0))))
(fma
(/
(+
(/
(+ (pow t_3 3.0) (pow t_2 3.0))
(fma t_3 t_3 (- (* t_2 t_2) (* t_3 t_2))))
(sin (* 0.5 (PI))))
2.0)
(* a a)
(pow (* (sin (* (/ angle_m 180.0) (PI))) b) 2.0))))\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(angle\_m, -0.005555555555555556, 0.5\right) \cdot \mathsf{PI}\left(\right)\\
t_1 := \mathsf{fma}\left(angle\_m, -0.005555555555555556, 2\right) \cdot \mathsf{PI}\left(\right)\\
t_2 := \sin t\_1 \cdot \cos t\_0\\
t_3 := \cos t\_1 \cdot \sin t\_0\\
\mathsf{fma}\left(\frac{\frac{{t\_3}^{3} + {t\_2}^{3}}{\mathsf{fma}\left(t\_3, t\_3, t\_2 \cdot t\_2 - t\_3 \cdot t\_2\right)} + \sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right)}{2}, a \cdot a, {\left(\sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2}\right)
\end{array}
\end{array}
Initial program 81.4%
lift-+.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow-prod-downN/A
lower-fma.f64N/A
lower-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.4
Applied rewrites81.4%
Applied rewrites71.1%
Taylor expanded in angle around inf
+-commutativeN/A
+-commutativeN/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-+.f64N/A
Applied rewrites81.5%
Applied rewrites81.5%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* (fma angle_m -0.005555555555555556 0.5) (PI)))
(t_1 (* (fma angle_m -0.005555555555555556 2.0) (PI))))
(fma
(/
(+ (fma (sin t_0) (cos t_1) (* (sin t_1) (cos t_0))) (sin (* 0.5 (PI))))
2.0)
(* a a)
(pow (* (sin (* (/ angle_m 180.0) (PI))) b) 2.0))))\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(angle\_m, -0.005555555555555556, 0.5\right) \cdot \mathsf{PI}\left(\right)\\
t_1 := \mathsf{fma}\left(angle\_m, -0.005555555555555556, 2\right) \cdot \mathsf{PI}\left(\right)\\
\mathsf{fma}\left(\frac{\mathsf{fma}\left(\sin t\_0, \cos t\_1, \sin t\_1 \cdot \cos t\_0\right) + \sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right)}{2}, a \cdot a, {\left(\sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2}\right)
\end{array}
\end{array}
Initial program 81.4%
lift-+.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow-prod-downN/A
lower-fma.f64N/A
lower-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.4
Applied rewrites81.4%
Applied rewrites71.1%
Taylor expanded in angle around inf
+-commutativeN/A
+-commutativeN/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-+.f64N/A
Applied rewrites81.5%
Applied rewrites81.5%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(fma
(*
a
(/
(+
(sin (* 0.5 (PI)))
(sin
(*
(PI)
(+
(fma angle_m -0.005555555555555556 0.5)
(fma angle_m -0.005555555555555556 2.0)))))
2.0))
a
(pow (* (sin (* (/ angle_m 180.0) (PI))) b) 2.0)))\begin{array}{l}
angle_m = \left|angle\right|
\\
\mathsf{fma}\left(a \cdot \frac{\sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right) + \sin \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{fma}\left(angle\_m, -0.005555555555555556, 0.5\right) + \mathsf{fma}\left(angle\_m, -0.005555555555555556, 2\right)\right)\right)}{2}, a, {\left(\sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2}\right)
\end{array}
Initial program 81.4%
lift-+.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow-prod-downN/A
lower-fma.f64N/A
lower-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.4
Applied rewrites81.4%
Applied rewrites71.1%
Taylor expanded in angle around inf
+-commutativeN/A
+-commutativeN/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-+.f64N/A
Applied rewrites81.5%
lift-fma.f64N/A
Applied rewrites81.5%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (fma (* (* 1.0 a) 1.0) a (pow (* (sin (* (/ angle_m 180.0) (PI))) b) 2.0)))
\begin{array}{l}
angle_m = \left|angle\right|
\\
\mathsf{fma}\left(\left(1 \cdot a\right) \cdot 1, a, {\left(\sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2}\right)
\end{array}
Initial program 81.4%
Taylor expanded in angle around 0
Applied rewrites81.6%
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites81.6%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (fma (* (* 1.0 a) 1.0) a (pow (* (sin (* (* angle_m (PI)) 0.005555555555555556)) b) 2.0)))
\begin{array}{l}
angle_m = \left|angle\right|
\\
\mathsf{fma}\left(\left(1 \cdot a\right) \cdot 1, a, {\left(\sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right) \cdot b\right)}^{2}\right)
\end{array}
Initial program 81.4%
Taylor expanded in angle around 0
Applied rewrites81.6%
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites81.6%
Taylor expanded in angle around inf
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6481.6
Applied rewrites81.6%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(if (<= b 8e-120)
(* (pow (cos (* (* 0.005555555555555556 (PI)) angle_m)) 2.0) (* a a))
(fma
(* (* 1.0 a) 1.0)
a
(pow (* (* (* b (PI)) 0.005555555555555556) angle_m) 2.0))))\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8 \cdot 10^{-120}:\\
\;\;\;\;{\cos \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)}^{2} \cdot \left(a \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(1 \cdot a\right) \cdot 1, a, {\left(\left(\left(b \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right)}^{2}\right)\\
\end{array}
\end{array}
if b < 7.99999999999999983e-120Initial program 80.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
sin-sumN/A
lift-cos.f64N/A
sin-PI/2N/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
Applied rewrites80.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites61.1%
if 7.99999999999999983e-120 < b Initial program 83.1%
Taylor expanded in angle around 0
Applied rewrites84.1%
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites84.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6478.5
Applied rewrites78.5%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(if (<= b 8e-120)
(* (pow (cos (* -0.005555555555555556 (* angle_m (PI)))) 2.0) (* a a))
(fma
(* (* 1.0 a) 1.0)
a
(pow (* (* (* b (PI)) 0.005555555555555556) angle_m) 2.0))))\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8 \cdot 10^{-120}:\\
\;\;\;\;{\cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot \left(a \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(1 \cdot a\right) \cdot 1, a, {\left(\left(\left(b \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right)}^{2}\right)\\
\end{array}
\end{array}
if b < 7.99999999999999983e-120Initial program 80.5%
Taylor expanded in angle around 0
Applied rewrites80.3%
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites80.3%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
Applied rewrites61.1%
if 7.99999999999999983e-120 < b Initial program 83.1%
Taylor expanded in angle around 0
Applied rewrites84.1%
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites84.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6478.5
Applied rewrites78.5%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(if (<= b 7.2e-120)
(*
(fma
(cos (* -2.0 (* (fma -0.005555555555555556 angle_m 1.0) (PI))))
0.5
0.5)
(* a a))
(fma
(* (* 1.0 a) 1.0)
a
(pow (* (* (* b (PI)) 0.005555555555555556) angle_m) 2.0))))\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7.2 \cdot 10^{-120}:\\
\;\;\;\;\mathsf{fma}\left(\cos \left(-2 \cdot \left(\mathsf{fma}\left(-0.005555555555555556, angle\_m, 1\right) \cdot \mathsf{PI}\left(\right)\right)\right), 0.5, 0.5\right) \cdot \left(a \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(1 \cdot a\right) \cdot 1, a, {\left(\left(\left(b \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right)}^{2}\right)\\
\end{array}
\end{array}
if b < 7.2000000000000005e-120Initial program 80.5%
lift-+.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow-prod-downN/A
lower-fma.f64N/A
lower-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6480.5
Applied rewrites80.5%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
add-cube-cbrtN/A
lift-/.f64N/A
associate-*l*N/A
lower-*.f64N/A
pow2N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-cbrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-cbrt.f6480.7
Applied rewrites80.7%
Applied rewrites80.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites61.1%
if 7.2000000000000005e-120 < b Initial program 83.1%
Taylor expanded in angle around 0
Applied rewrites84.1%
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites84.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6478.5
Applied rewrites78.5%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(if (<= a 3.5e+82)
(fma
(*
(* (* (- a b) (+ b a)) (* (* (PI) (PI)) -3.08641975308642e-5))
(- angle_m))
(- angle_m)
(* a a))
(* a a)))\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right) \cdot \left(-angle\_m\right), -angle\_m, a \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot a\\
\end{array}
\end{array}
if a < 3.5e82Initial program 78.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites48.0%
Applied rewrites51.5%
if 3.5e82 < a Initial program 93.6%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6491.8
Applied rewrites91.8%
Final simplification59.5%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(if (<= b 7.5e-92)
(* a a)
(if (<= b 3.2e+152)
(fma
(* (* (* 3.08641975308642e-5 (* b b)) (PI)) (PI))
(* angle_m angle_m)
(* a a))
(*
(* 3.08641975308642e-5 (* (* (* b angle_m) angle_m) b))
(* (PI) (PI))))))\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7.5 \cdot 10^{-92}:\\
\;\;\;\;a \cdot a\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(3.08641975308642 \cdot 10^{-5} \cdot \left(b \cdot b\right)\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), angle\_m \cdot angle\_m, a \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(\left(b \cdot angle\_m\right) \cdot angle\_m\right) \cdot b\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\\
\end{array}
\end{array}
if b < 7.5000000000000005e-92Initial program 80.5%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6461.8
Applied rewrites61.8%
if 7.5000000000000005e-92 < b < 3.20000000000000005e152Initial program 74.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites33.8%
Taylor expanded in a around 0
Applied rewrites61.2%
if 3.20000000000000005e152 < b Initial program 97.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites49.3%
Taylor expanded in a around 0
Applied rewrites73.6%
Applied rewrites76.7%
Final simplification63.6%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(if (<= a 3.5e+82)
(fma
(* (* (- a b) (+ b a)) (* (* (* (PI) (PI)) -3.08641975308642e-5) angle_m))
angle_m
(* a a))
(* a a)))\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot -3.08641975308642 \cdot 10^{-5}\right) \cdot angle\_m\right), angle\_m, a \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot a\\
\end{array}
\end{array}
if a < 3.5e82Initial program 78.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites48.0%
Applied rewrites51.5%
if 3.5e82 < a Initial program 93.6%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6491.8
Applied rewrites91.8%
Final simplification59.5%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= b 5.4e+162) (* a a) (* (* 3.08641975308642e-5 (* (* (* b angle_m) angle_m) b)) (* (PI) (PI)))))
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.4 \cdot 10^{+162}:\\
\;\;\;\;a \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(\left(b \cdot angle\_m\right) \cdot angle\_m\right) \cdot b\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\\
\end{array}
\end{array}
if b < 5.4000000000000003e162Initial program 79.1%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6460.5
Applied rewrites60.5%
if 5.4000000000000003e162 < b Initial program 99.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites55.6%
Taylor expanded in a around 0
Applied rewrites79.9%
Applied rewrites83.3%
Final simplification63.1%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= b 5.4e+162) (* a a) (* (* 3.08641975308642e-5 (* (* (* angle_m angle_m) b) b)) (* (PI) (PI)))))
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.4 \cdot 10^{+162}:\\
\;\;\;\;a \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(\left(angle\_m \cdot angle\_m\right) \cdot b\right) \cdot b\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\\
\end{array}
\end{array}
if b < 5.4000000000000003e162Initial program 79.1%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6460.5
Applied rewrites60.5%
if 5.4000000000000003e162 < b Initial program 99.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites55.6%
Taylor expanded in a around 0
Applied rewrites79.9%
Final simplification62.7%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (* a a))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return a * a;
}
angle_m = abs(angle)
real(8) function code(a, b, angle_m)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: angle_m
code = a * a
end function
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return a * a;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return a * a
angle_m = abs(angle) function code(a, b, angle_m) return Float64(a * a) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = a * a; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(a * a), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
a \cdot a
\end{array}
Initial program 81.4%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6457.4
Applied rewrites57.4%
Final simplification57.4%
herbie shell --seed 2024344
(FPCore (a b angle)
:name "ab-angle->ABCF C"
:precision binary64
(+ (pow (* a (cos (* (PI) (/ angle 180.0)))) 2.0) (pow (* b (sin (* (PI) (/ angle 180.0)))) 2.0)))