
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) (PI)))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
(PI)))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\mathsf{PI}\left(\right)}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) (PI)))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
(PI)))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\mathsf{PI}\left(\right)}
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* (PI) angle) 0.005555555555555556))
(t_1 (sin t_0))
(t_2 (cos t_0)))
(if (<= b_m 1.55e-37)
(*
(* (pow (PI) -1.0) 180.0)
(atan
(*
(/ y-scale x-scale)
(tan (* (cbrt (pow (PI) 3.0)) (* 0.005555555555555556 angle))))))
(if (<= b_m 8e+136)
(*
(/
(atan
(*
(/
(/
(*
(*
(+ (pow (* t_2 b_m) 2.0) (pow (* t_1 a) 2.0))
(/ y-scale x-scale))
(/ 2.0 t_2))
(+ a b_m))
(* (- b_m a) t_1))
-0.5))
(PI))
180.0)
(if (<= b_m 2.4e+201)
(*
(/
(atan
(*
(/ t_1 (cos (* (PI) (* 0.005555555555555556 angle))))
(/ y-scale x-scale)))
(PI))
180.0)
(* (/ (atan (* (/ (- y-scale) x-scale) (/ t_2 t_1))) (PI)) 180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 1.55 \cdot 10^{-37}:\\
\;\;\;\;\left({\mathsf{PI}\left(\right)}^{-1} \cdot 180\right) \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 8 \cdot 10^{+136}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\frac{\left(\left({\left(t\_2 \cdot b\_m\right)}^{2} + {\left(t\_1 \cdot a\right)}^{2}\right) \cdot \frac{y-scale}{x-scale}\right) \cdot \frac{2}{t\_2}}{a + b\_m}}{\left(b\_m - a\right) \cdot t\_1} \cdot -0.5\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 2.4 \cdot 10^{+201}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{t\_1}{\cos \left(\mathsf{PI}\left(\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)} \cdot \frac{y-scale}{x-scale}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{t\_2}{t\_1}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 1.54999999999999997e-37Initial program 14.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites29.4%
Taylor expanded in a around inf
Applied rewrites57.3%
Applied rewrites54.3%
Applied rewrites59.9%
if 1.54999999999999997e-37 < b < 8.00000000000000047e136Initial program 29.5%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites53.5%
Applied rewrites50.2%
Applied rewrites62.9%
if 8.00000000000000047e136 < b < 2.39999999999999993e201Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites9.2%
Taylor expanded in a around inf
Applied rewrites58.4%
Applied rewrites58.2%
if 2.39999999999999993e201 < b Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around 0
Applied rewrites55.5%
Final simplification59.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sqrt (PI)))
(t_1 (* (PI) (* 0.005555555555555556 angle)))
(t_2 (sin t_1))
(t_3 (cos t_1))
(t_4 (* (* (PI) angle) 0.005555555555555556))
(t_5 (sin t_4)))
(if (<= b_m 4.6e-15)
(*
(* (pow (PI) -1.0) 180.0)
(atan
(*
(/ y-scale x-scale)
(tan (* (cbrt (pow (PI) 3.0)) (* 0.005555555555555556 angle))))))
(if (<= b_m 5.2e+119)
(*
(/
(atan
(*
(*
(/ y-scale (* (* (* (+ a b_m) x-scale) (- b_m a)) t_2))
(* (+ (pow (* t_3 b_m) 2.0) (pow (* t_2 a) 2.0)) 2.0))
-0.5))
t_0)
(/ 180.0 t_0))
(if (<= b_m 2.4e+201)
(* (/ (atan (* (/ t_5 t_3) (/ y-scale x-scale))) (PI)) 180.0)
(*
(/ (atan (* (/ (- y-scale) x-scale) (/ (cos t_4) t_5))) (PI))
180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
t_1 := \mathsf{PI}\left(\right) \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_2 := \sin t\_1\\
t_3 := \cos t\_1\\
t_4 := \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\\
t_5 := \sin t\_4\\
\mathbf{if}\;b\_m \leq 4.6 \cdot 10^{-15}:\\
\;\;\;\;\left({\mathsf{PI}\left(\right)}^{-1} \cdot 180\right) \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 5.2 \cdot 10^{+119}:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\left(\left(a + b\_m\right) \cdot x-scale\right) \cdot \left(b\_m - a\right)\right) \cdot t\_2} \cdot \left(\left({\left(t\_3 \cdot b\_m\right)}^{2} + {\left(t\_2 \cdot a\right)}^{2}\right) \cdot 2\right)\right) \cdot -0.5\right)}{t\_0} \cdot \frac{180}{t\_0}\\
\mathbf{elif}\;b\_m \leq 2.4 \cdot 10^{+201}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{t\_5}{t\_3} \cdot \frac{y-scale}{x-scale}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{\cos t\_4}{t\_5}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 4.59999999999999981e-15Initial program 14.7%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites30.2%
Taylor expanded in a around inf
Applied rewrites57.3%
Applied rewrites54.4%
Applied rewrites59.9%
if 4.59999999999999981e-15 < b < 5.2e119Initial program 33.2%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites54.0%
Applied rewrites45.3%
Taylor expanded in angle around 0
Applied rewrites50.7%
if 5.2e119 < b < 2.39999999999999993e201Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites19.4%
Taylor expanded in a around inf
Applied rewrites49.0%
Applied rewrites48.9%
if 2.39999999999999993e201 < b Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around 0
Applied rewrites55.5%
Final simplification57.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* (PI) angle) 0.005555555555555556))
(t_1 (cos t_0))
(t_2 (sin t_0)))
(if (<= b_m 1e-28)
(*
(* (pow (PI) -1.0) 180.0)
(atan
(*
(/ y-scale x-scale)
(tan (* (cbrt (pow (PI) 3.0)) (* 0.005555555555555556 angle))))))
(if (<= b_m 2.7e+79)
(*
(/
(atan
(*
(/
(*
(* (fma (* a a) (pow t_2 2.0) (* (pow t_1 2.0) (* b_m b_m))) 2.0)
y-scale)
(* (* (* (- b_m a) (+ a b_m)) t_2) (* 1.0 x-scale)))
-0.5))
(PI))
180.0)
(* (/ (atan (* (/ (- y-scale) x-scale) (/ t_1 t_2))) (PI)) 180.0)))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 10^{-28}:\\
\;\;\;\;\left({\mathsf{PI}\left(\right)}^{-1} \cdot 180\right) \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 2.7 \cdot 10^{+79}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(\mathsf{fma}\left(a \cdot a, {t\_2}^{2}, {t\_1}^{2} \cdot \left(b\_m \cdot b\_m\right)\right) \cdot 2\right) \cdot y-scale}{\left(\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot t\_2\right) \cdot \left(1 \cdot x-scale\right)} \cdot -0.5\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 9.99999999999999971e-29Initial program 13.9%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites29.6%
Taylor expanded in a around inf
Applied rewrites57.2%
Applied rewrites54.2%
Applied rewrites59.8%
if 9.99999999999999971e-29 < b < 2.7e79Initial program 41.7%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.0%
Taylor expanded in angle around 0
Applied rewrites61.6%
if 2.7e79 < b Initial program 2.6%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites12.8%
Taylor expanded in a around 0
Applied rewrites51.2%
Final simplification58.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* (PI) angle) 0.005555555555555556))
(t_1 (cos t_0))
(t_2 (sin t_0)))
(if (<= b_m 5.1e-33)
(*
(* (pow (PI) -1.0) 180.0)
(atan
(*
(/ y-scale x-scale)
(tan (* (cbrt (pow (PI) 3.0)) (* 0.005555555555555556 angle))))))
(if (<= b_m 5.2e+119)
(*
(/
(atan
(*
(/
(*
(* (fma (* a a) (pow t_2 2.0) (* (pow 1.0 2.0) (* b_m b_m))) 2.0)
y-scale)
(* (* t_1 x-scale) (* (* (- b_m a) (+ a b_m)) t_2)))
-0.5))
(PI))
180.0)
(if (<= b_m 2.4e+201)
(*
(/
(atan
(*
(/ t_2 (cos (* (PI) (* 0.005555555555555556 angle))))
(/ y-scale x-scale)))
(PI))
180.0)
(* (/ (atan (* (/ (- y-scale) x-scale) (/ t_1 t_2))) (PI)) 180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 5.1 \cdot 10^{-33}:\\
\;\;\;\;\left({\mathsf{PI}\left(\right)}^{-1} \cdot 180\right) \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 5.2 \cdot 10^{+119}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(\mathsf{fma}\left(a \cdot a, {t\_2}^{2}, {1}^{2} \cdot \left(b\_m \cdot b\_m\right)\right) \cdot 2\right) \cdot y-scale}{\left(t\_1 \cdot x-scale\right) \cdot \left(\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot t\_2\right)} \cdot -0.5\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 2.4 \cdot 10^{+201}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{t\_2}{\cos \left(\mathsf{PI}\left(\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)} \cdot \frac{y-scale}{x-scale}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 5.10000000000000008e-33Initial program 14.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites29.2%
Taylor expanded in a around inf
Applied rewrites57.0%
Applied rewrites54.0%
Applied rewrites59.6%
if 5.10000000000000008e-33 < b < 5.2e119Initial program 35.7%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites57.0%
Taylor expanded in angle around 0
Applied rewrites56.9%
if 5.2e119 < b < 2.39999999999999993e201Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites19.4%
Taylor expanded in a around inf
Applied rewrites49.0%
Applied rewrites48.9%
if 2.39999999999999993e201 < b Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around 0
Applied rewrites55.5%
Final simplification58.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* (PI) angle) 0.005555555555555556)))
(if (<= b_m 92000000000000.0)
(*
(* (pow (PI) -1.0) 180.0)
(atan
(*
(/ y-scale x-scale)
(tan (* (cbrt (pow (PI) 3.0)) (* 0.005555555555555556 angle))))))
(if (<= b_m 2.7e+79)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(*
(/ (atan (* (/ (- y-scale) x-scale) (/ (cos t_0) (sin t_0)))) (PI))
180.0)))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;b\_m \leq 92000000000000:\\
\;\;\;\;\left({\mathsf{PI}\left(\right)}^{-1} \cdot 180\right) \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 2.7 \cdot 10^{+79}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{\cos t\_0}{\sin t\_0}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 9.2e13Initial program 14.9%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites30.0%
Taylor expanded in a around inf
Applied rewrites57.5%
Applied rewrites54.7%
Applied rewrites60.0%
if 9.2e13 < b < 2.7e79Initial program 43.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites50.3%
Taylor expanded in a around inf
Applied rewrites31.7%
Taylor expanded in x-scale around 0
Applied rewrites72.1%
if 2.7e79 < b Initial program 2.6%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites12.8%
Taylor expanded in a around 0
Applied rewrites51.2%
Final simplification59.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sqrt (PI)))
(t_1 (* (* (PI) angle) 0.005555555555555556))
(t_2 (sin t_1)))
(if (<= b_m 1.15e+14)
(*
(/
(atan
(*
(/ t_2 (cos (* (* t_0 t_0) (* 0.005555555555555556 angle))))
(/ y-scale x-scale)))
(PI))
180.0)
(if (<= b_m 2.7e+79)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(*
(/ (atan (* (/ (- y-scale) x-scale) (/ (cos t_1) t_2))) (PI))
180.0)))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
t_1 := \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\\
t_2 := \sin t\_1\\
\mathbf{if}\;b\_m \leq 1.15 \cdot 10^{+14}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{t\_2}{\cos \left(\left(t\_0 \cdot t\_0\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)} \cdot \frac{y-scale}{x-scale}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 2.7 \cdot 10^{+79}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{\cos t\_1}{t\_2}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 1.15e14Initial program 14.9%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites30.0%
Taylor expanded in a around inf
Applied rewrites57.5%
Applied rewrites57.8%
Applied rewrites58.3%
if 1.15e14 < b < 2.7e79Initial program 43.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites50.3%
Taylor expanded in a around inf
Applied rewrites31.7%
Taylor expanded in x-scale around 0
Applied rewrites72.1%
if 2.7e79 < b Initial program 2.6%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites12.8%
Taylor expanded in a around 0
Applied rewrites51.2%
Final simplification57.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sqrt (PI))))
(if (<= b_m 1.15e+14)
(*
(atan
(*
(tan (* (* t_0 t_0) (* 0.005555555555555556 angle)))
(/ y-scale x-scale)))
(* (pow (PI) -1.0) 180.0))
(if (<= b_m 5.4e+119)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(if (<= b_m 2.4e+201)
(*
(/
(atan
(*
(/
(sin (* (* (PI) angle) 0.005555555555555556))
(cos (* (PI) (* 0.005555555555555556 angle))))
(/ y-scale x-scale)))
(PI))
180.0)
(*
(/
(atan (* (* (/ y-scale (* (* (PI) x-scale) angle)) -2.0) 90.0))
(PI))
180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
\mathbf{if}\;b\_m \leq 1.15 \cdot 10^{+14}:\\
\;\;\;\;\tan^{-1} \left(\tan \left(\left(t\_0 \cdot t\_0\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \frac{y-scale}{x-scale}\right) \cdot \left({\mathsf{PI}\left(\right)}^{-1} \cdot 180\right)\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+119}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 2.4 \cdot 10^{+201}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)}{\cos \left(\mathsf{PI}\left(\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)} \cdot \frac{y-scale}{x-scale}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\mathsf{PI}\left(\right) \cdot x-scale\right) \cdot angle} \cdot -2\right) \cdot 90\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 1.15e14Initial program 14.9%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites30.0%
Taylor expanded in a around inf
Applied rewrites57.5%
Applied rewrites54.7%
Applied rewrites58.7%
if 1.15e14 < b < 5.3999999999999997e119Initial program 36.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.8%
Taylor expanded in a around inf
Applied rewrites23.1%
Taylor expanded in x-scale around 0
Applied rewrites56.1%
if 5.3999999999999997e119 < b < 2.39999999999999993e201Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites19.4%
Taylor expanded in a around inf
Applied rewrites49.0%
Applied rewrites48.9%
if 2.39999999999999993e201 < b Initial program 0.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around inf
Applied rewrites14.1%
Taylor expanded in a around 0
Applied rewrites53.8%
Final simplification57.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sqrt (PI)))
(t_1
(*
(atan
(*
(tan (* (* t_0 t_0) (* 0.005555555555555556 angle)))
(/ y-scale x-scale)))
(* (pow (PI) -1.0) 180.0))))
(if (<= b_m 1.15e+14)
t_1
(if (<= b_m 1.06e+85)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(if (<= b_m 3.2e+212)
t_1
(*
(/
(atan (* (* (/ y-scale (* (* (PI) x-scale) angle)) -2.0) 90.0))
(PI))
180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
t_1 := \tan^{-1} \left(\tan \left(\left(t\_0 \cdot t\_0\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \frac{y-scale}{x-scale}\right) \cdot \left({\mathsf{PI}\left(\right)}^{-1} \cdot 180\right)\\
\mathbf{if}\;b\_m \leq 1.15 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b\_m \leq 1.06 \cdot 10^{+85}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 3.2 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\mathsf{PI}\left(\right) \cdot x-scale\right) \cdot angle} \cdot -2\right) \cdot 90\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 1.15e14 or 1.0600000000000001e85 < b < 3.1999999999999999e212Initial program 13.8%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites29.3%
Taylor expanded in a around inf
Applied rewrites55.3%
Applied rewrites52.8%
Applied rewrites56.9%
if 1.15e14 < b < 1.0600000000000001e85Initial program 41.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites47.2%
Taylor expanded in a around inf
Applied rewrites29.7%
Taylor expanded in x-scale around 0
Applied rewrites67.5%
if 3.1999999999999999e212 < b Initial program 0.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around inf
Applied rewrites14.4%
Taylor expanded in a around 0
Applied rewrites56.2%
Final simplification57.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* (PI) angle) 0.005555555555555556)) (t_1 (sqrt (PI))))
(if (<= b_m 1.15e+14)
(*
(atan
(*
(tan (* (* t_1 t_1) (* 0.005555555555555556 angle)))
(/ y-scale x-scale)))
(* (pow (PI) -1.0) 180.0))
(if (<= b_m 2.7e+79)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(*
(/ (atan (* (/ (- y-scale) x-scale) (/ (cos t_0) (sin t_0)))) (PI))
180.0)))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \sqrt{\mathsf{PI}\left(\right)}\\
\mathbf{if}\;b\_m \leq 1.15 \cdot 10^{+14}:\\
\;\;\;\;\tan^{-1} \left(\tan \left(\left(t\_1 \cdot t\_1\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \frac{y-scale}{x-scale}\right) \cdot \left({\mathsf{PI}\left(\right)}^{-1} \cdot 180\right)\\
\mathbf{elif}\;b\_m \leq 2.7 \cdot 10^{+79}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{\cos t\_0}{\sin t\_0}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 1.15e14Initial program 14.9%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites30.0%
Taylor expanded in a around inf
Applied rewrites57.5%
Applied rewrites54.7%
Applied rewrites58.7%
if 1.15e14 < b < 2.7e79Initial program 43.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites50.3%
Taylor expanded in a around inf
Applied rewrites31.7%
Taylor expanded in x-scale around 0
Applied rewrites72.1%
if 2.7e79 < b Initial program 2.6%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites12.8%
Taylor expanded in a around 0
Applied rewrites51.2%
Final simplification58.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0
(atan
(*
(tan (* (* (PI) angle) 0.005555555555555556))
(/ y-scale x-scale)))))
(if (<= b_m 70000000000000.0)
(* t_0 (/ 180.0 (PI)))
(if (<= b_m 5.4e+119)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(if (<= b_m 2.4e+201)
(/ 180.0 (/ (PI) t_0))
(*
(/
(atan (* (* (/ y-scale (* (* (PI) x-scale) angle)) -2.0) 90.0))
(PI))
180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\tan \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \frac{y-scale}{x-scale}\right)\\
\mathbf{if}\;b\_m \leq 70000000000000:\\
\;\;\;\;t\_0 \cdot \frac{180}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+119}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 2.4 \cdot 10^{+201}:\\
\;\;\;\;\frac{180}{\frac{\mathsf{PI}\left(\right)}{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\mathsf{PI}\left(\right) \cdot x-scale\right) \cdot angle} \cdot -2\right) \cdot 90\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 7e13Initial program 14.9%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites30.0%
Taylor expanded in a around inf
Applied rewrites57.5%
Applied rewrites57.8%
Applied rewrites57.5%
if 7e13 < b < 5.3999999999999997e119Initial program 36.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.8%
Taylor expanded in a around inf
Applied rewrites23.1%
Taylor expanded in x-scale around 0
Applied rewrites56.1%
if 5.3999999999999997e119 < b < 2.39999999999999993e201Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites19.4%
Taylor expanded in a around inf
Applied rewrites49.0%
Applied rewrites48.9%
Applied rewrites49.2%
if 2.39999999999999993e201 < b Initial program 0.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around inf
Applied rewrites14.1%
Taylor expanded in a around 0
Applied rewrites53.8%
Final simplification56.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (tan (* (* (PI) angle) 0.005555555555555556))))
(if (<= b_m 70000000000000.0)
(* (atan (* t_0 (/ y-scale x-scale))) (/ 180.0 (PI)))
(if (<= b_m 5.4e+119)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(if (<= b_m 2.4e+201)
(* (/ (atan (/ t_0 (/ x-scale y-scale))) (PI)) 180.0)
(*
(/
(atan (* (* (/ y-scale (* (* (PI) x-scale) angle)) -2.0) 90.0))
(PI))
180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \tan \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\\
\mathbf{if}\;b\_m \leq 70000000000000:\\
\;\;\;\;\tan^{-1} \left(t\_0 \cdot \frac{y-scale}{x-scale}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+119}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 2.4 \cdot 10^{+201}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{t\_0}{\frac{x-scale}{y-scale}}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\mathsf{PI}\left(\right) \cdot x-scale\right) \cdot angle} \cdot -2\right) \cdot 90\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 7e13Initial program 14.9%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites30.0%
Taylor expanded in a around inf
Applied rewrites57.5%
Applied rewrites57.8%
Applied rewrites57.5%
if 7e13 < b < 5.3999999999999997e119Initial program 36.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.8%
Taylor expanded in a around inf
Applied rewrites23.1%
Taylor expanded in x-scale around 0
Applied rewrites56.1%
if 5.3999999999999997e119 < b < 2.39999999999999993e201Initial program 0.0%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites19.4%
Taylor expanded in a around inf
Applied rewrites49.0%
Applied rewrites48.9%
Applied rewrites49.1%
if 2.39999999999999993e201 < b Initial program 0.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around inf
Applied rewrites14.1%
Taylor expanded in a around 0
Applied rewrites53.8%
Final simplification56.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0
(*
(atan
(*
(tan (* (* (PI) angle) 0.005555555555555556))
(/ y-scale x-scale)))
(/ 180.0 (PI)))))
(if (<= b_m 70000000000000.0)
t_0
(if (<= b_m 5.4e+119)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(if (<= b_m 2.4e+201)
t_0
(*
(/
(atan (* (* (/ y-scale (* (* (PI) x-scale) angle)) -2.0) 90.0))
(PI))
180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\tan \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \frac{y-scale}{x-scale}\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}\\
\mathbf{if}\;b\_m \leq 70000000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+119}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 2.4 \cdot 10^{+201}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\mathsf{PI}\left(\right) \cdot x-scale\right) \cdot angle} \cdot -2\right) \cdot 90\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 7e13 or 5.3999999999999997e119 < b < 2.39999999999999993e201Initial program 13.7%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites29.1%
Taylor expanded in a around inf
Applied rewrites56.8%
Applied rewrites57.1%
Applied rewrites56.9%
if 7e13 < b < 5.3999999999999997e119Initial program 36.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.8%
Taylor expanded in a around inf
Applied rewrites23.1%
Taylor expanded in x-scale around 0
Applied rewrites56.1%
if 2.39999999999999993e201 < b Initial program 0.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around inf
Applied rewrites14.1%
Taylor expanded in a around 0
Applied rewrites53.8%
Final simplification56.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0
(*
(/
(atan
(*
(/ (tan (* (* (PI) angle) 0.005555555555555556)) x-scale)
y-scale))
(PI))
180.0)))
(if (<= b_m 70000000000000.0)
t_0
(if (<= b_m 5.4e+119)
(*
(/
(atan
(*
90.0
(/
(* (* (* b_m b_m) y-scale) -2.0)
(* (* (* (+ a b_m) (PI)) (- b_m a)) (* x-scale angle)))))
(PI))
180.0)
(if (<= b_m 2.4e+201)
t_0
(*
(/
(atan (* (* (/ y-scale (* (* (PI) x-scale) angle)) -2.0) 90.0))
(PI))
180.0))))))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \frac{\tan^{-1} \left(\frac{\tan \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{if}\;b\_m \leq 70000000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+119}:\\
\;\;\;\;\frac{\tan^{-1} \left(90 \cdot \frac{\left(\left(b\_m \cdot b\_m\right) \cdot y-scale\right) \cdot -2}{\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \left(x-scale \cdot angle\right)}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;b\_m \leq 2.4 \cdot 10^{+201}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\mathsf{PI}\left(\right) \cdot x-scale\right) \cdot angle} \cdot -2\right) \cdot 90\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 7e13 or 5.3999999999999997e119 < b < 2.39999999999999993e201Initial program 13.7%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites29.1%
Taylor expanded in a around inf
Applied rewrites56.8%
Applied rewrites57.1%
Applied rewrites55.6%
if 7e13 < b < 5.3999999999999997e119Initial program 36.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.8%
Taylor expanded in a around inf
Applied rewrites23.1%
Taylor expanded in x-scale around 0
Applied rewrites56.1%
if 2.39999999999999993e201 < b Initial program 0.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in a around inf
Applied rewrites14.1%
Taylor expanded in a around 0
Applied rewrites53.8%
Final simplification55.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.5e-15)
(*
(/
(atan (* (/ (* (* (PI) y-scale) angle) x-scale) 0.005555555555555556))
(PI))
180.0)
(*
(/ (atan (* (* (/ y-scale (* (* (PI) x-scale) angle)) -2.0) 90.0)) (PI))
180.0)))\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.5 \cdot 10^{-15}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(\mathsf{PI}\left(\right) \cdot y-scale\right) \cdot angle}{x-scale} \cdot 0.005555555555555556\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(\frac{y-scale}{\left(\mathsf{PI}\left(\right) \cdot x-scale\right) \cdot angle} \cdot -2\right) \cdot 90\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if b < 4.4999999999999998e-15Initial program 14.7%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites30.2%
Taylor expanded in a around inf
Applied rewrites57.3%
Applied rewrites57.7%
Taylor expanded in angle around 0
Applied rewrites45.4%
if 4.4999999999999998e-15 < b Initial program 13.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites14.8%
Taylor expanded in a around inf
Applied rewrites14.7%
Taylor expanded in a around 0
Applied rewrites46.3%
Final simplification45.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* (/ (atan (* (/ (* (* (PI) y-scale) angle) x-scale) 0.005555555555555556)) (PI)) 180.0))
\begin{array}{l}
b_m = \left|b\right|
\\
\frac{\tan^{-1} \left(\frac{\left(\mathsf{PI}\left(\right) \cdot y-scale\right) \cdot angle}{x-scale} \cdot 0.005555555555555556\right)}{\mathsf{PI}\left(\right)} \cdot 180
\end{array}
Initial program 14.3%
Taylor expanded in x-scale around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites29.3%
Taylor expanded in a around inf
Applied rewrites51.3%
Applied rewrites51.2%
Taylor expanded in angle around 0
Applied rewrites40.4%
Final simplification40.4%
herbie shell --seed 2024331
(FPCore (a b angle x-scale y-scale)
:name "raw-angle from scale-rotated-ellipse"
:precision binary64
(* 180.0 (/ (atan (/ (- (- (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (sin (* (/ angle 180.0) (PI)))) 2.0)) y-scale) y-scale) (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (cos (* (/ angle 180.0) (PI)))) 2.0)) x-scale) x-scale)) (sqrt (+ (pow (- (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (cos (* (/ angle 180.0) (PI)))) 2.0)) x-scale) x-scale) (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (sin (* (/ angle 180.0) (PI)))) 2.0)) y-scale) y-scale)) 2.0) (pow (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) (PI)))) (cos (* (/ angle 180.0) (PI)))) x-scale) y-scale) 2.0)))) (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) (PI)))) (cos (* (/ angle 180.0) (PI)))) x-scale) y-scale))) (PI))))