Initial program 96.7%
\[\left(\sin \left(\left(1 - u\right) \cdot normAngle\right) \cdot \frac{1}{\sin normAngle}\right) \cdot n0_i + \left(\sin \left(u \cdot normAngle\right) \cdot \frac{1}{\sin normAngle}\right) \cdot n1_i
\]
Simplified97.3%
\[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\sin \left(\left(1 - u\right) \cdot normAngle\right)}{\sin normAngle}, n0_i, \frac{\sin \left(u \cdot normAngle\right)}{\sin normAngle} \cdot n1_i\right)}
\]
Step-by-step derivation
[Start]96.7% | \[ \left(\sin \left(\left(1 - u\right) \cdot normAngle\right) \cdot \frac{1}{\sin normAngle}\right) \cdot n0_i + \left(\sin \left(u \cdot normAngle\right) \cdot \frac{1}{\sin normAngle}\right) \cdot n1_i
\] |
|---|
fma-def [=>]96.7% | \[ \color{blue}{\mathsf{fma}\left(\sin \left(\left(1 - u\right) \cdot normAngle\right) \cdot \frac{1}{\sin normAngle}, n0_i, \left(\sin \left(u \cdot normAngle\right) \cdot \frac{1}{\sin normAngle}\right) \cdot n1_i\right)}
\] |
|---|
associate-*r/ [=>]96.8% | \[ \mathsf{fma}\left(\color{blue}{\frac{\sin \left(\left(1 - u\right) \cdot normAngle\right) \cdot 1}{\sin normAngle}}, n0_i, \left(\sin \left(u \cdot normAngle\right) \cdot \frac{1}{\sin normAngle}\right) \cdot n1_i\right)
\] |
|---|
*-rgt-identity [=>]96.8% | \[ \mathsf{fma}\left(\frac{\color{blue}{\sin \left(\left(1 - u\right) \cdot normAngle\right)}}{\sin normAngle}, n0_i, \left(\sin \left(u \cdot normAngle\right) \cdot \frac{1}{\sin normAngle}\right) \cdot n1_i\right)
\] |
|---|
associate-*r/ [=>]97.3% | \[ \mathsf{fma}\left(\frac{\sin \left(\left(1 - u\right) \cdot normAngle\right)}{\sin normAngle}, n0_i, \color{blue}{\frac{\sin \left(u \cdot normAngle\right) \cdot 1}{\sin normAngle}} \cdot n1_i\right)
\] |
|---|
*-rgt-identity [=>]97.3% | \[ \mathsf{fma}\left(\frac{\sin \left(\left(1 - u\right) \cdot normAngle\right)}{\sin normAngle}, n0_i, \frac{\color{blue}{\sin \left(u \cdot normAngle\right)}}{\sin normAngle} \cdot n1_i\right)
\] |
|---|
Taylor expanded in normAngle around 0 99.0%
\[\leadsto \color{blue}{n1_i \cdot u + \left(\left(\left(-0.16666666666666666 \cdot \left(n1_i \cdot {u}^{3}\right) + \left(-0.16666666666666666 \cdot {\left(1 - u\right)}^{3} - -0.16666666666666666 \cdot \left(1 - u\right)\right) \cdot n0_i\right) - -0.16666666666666666 \cdot \left(n1_i \cdot u\right)\right) \cdot {normAngle}^{2} + \left(1 - u\right) \cdot n0_i\right)}
\]
Simplified99.2%
\[\leadsto \color{blue}{\mathsf{fma}\left(u, n1_i, \mathsf{fma}\left(normAngle \cdot normAngle, -0.16666666666666666 \cdot \left(n0_i \cdot \left({\left(1 - u\right)}^{3} - \left(1 - u\right)\right)\right) + -0.16666666666666666 \cdot \left(n1_i \cdot \left({u}^{3} - u\right)\right), \left(1 - u\right) \cdot n0_i\right)\right)}
\]
Step-by-step derivation
[Start]99.0% | \[ n1_i \cdot u + \left(\left(\left(-0.16666666666666666 \cdot \left(n1_i \cdot {u}^{3}\right) + \left(-0.16666666666666666 \cdot {\left(1 - u\right)}^{3} - -0.16666666666666666 \cdot \left(1 - u\right)\right) \cdot n0_i\right) - -0.16666666666666666 \cdot \left(n1_i \cdot u\right)\right) \cdot {normAngle}^{2} + \left(1 - u\right) \cdot n0_i\right)
\] |
|---|
*-commutative [=>]99.0% | \[ \color{blue}{u \cdot n1_i} + \left(\left(\left(-0.16666666666666666 \cdot \left(n1_i \cdot {u}^{3}\right) + \left(-0.16666666666666666 \cdot {\left(1 - u\right)}^{3} - -0.16666666666666666 \cdot \left(1 - u\right)\right) \cdot n0_i\right) - -0.16666666666666666 \cdot \left(n1_i \cdot u\right)\right) \cdot {normAngle}^{2} + \left(1 - u\right) \cdot n0_i\right)
\] |
|---|
fma-def [=>]99.2% | \[ \color{blue}{\mathsf{fma}\left(u, n1_i, \left(\left(-0.16666666666666666 \cdot \left(n1_i \cdot {u}^{3}\right) + \left(-0.16666666666666666 \cdot {\left(1 - u\right)}^{3} - -0.16666666666666666 \cdot \left(1 - u\right)\right) \cdot n0_i\right) - -0.16666666666666666 \cdot \left(n1_i \cdot u\right)\right) \cdot {normAngle}^{2} + \left(1 - u\right) \cdot n0_i\right)}
\] |
|---|
*-commutative [=>]99.2% | \[ \mathsf{fma}\left(u, n1_i, \color{blue}{{normAngle}^{2} \cdot \left(\left(-0.16666666666666666 \cdot \left(n1_i \cdot {u}^{3}\right) + \left(-0.16666666666666666 \cdot {\left(1 - u\right)}^{3} - -0.16666666666666666 \cdot \left(1 - u\right)\right) \cdot n0_i\right) - -0.16666666666666666 \cdot \left(n1_i \cdot u\right)\right)} + \left(1 - u\right) \cdot n0_i\right)
\] |
|---|
fma-def [=>]99.2% | \[ \mathsf{fma}\left(u, n1_i, \color{blue}{\mathsf{fma}\left({normAngle}^{2}, \left(-0.16666666666666666 \cdot \left(n1_i \cdot {u}^{3}\right) + \left(-0.16666666666666666 \cdot {\left(1 - u\right)}^{3} - -0.16666666666666666 \cdot \left(1 - u\right)\right) \cdot n0_i\right) - -0.16666666666666666 \cdot \left(n1_i \cdot u\right), \left(1 - u\right) \cdot n0_i\right)}\right)
\] |
|---|
Final simplification99.2%
\[\leadsto \mathsf{fma}\left(u, n1_i, \mathsf{fma}\left(normAngle \cdot normAngle, -0.16666666666666666 \cdot \left(n0_i \cdot \left({\left(1 - u\right)}^{3} + \left(u + -1\right)\right)\right) + -0.16666666666666666 \cdot \left(n1_i \cdot \left({u}^{3} - u\right)\right), n0_i \cdot \left(1 - u\right)\right)\right)
\]