remove old comment

This commit is contained in:
Quaternions 2024-09-02 17:49:15 -07:00
parent 5cb98ee29f
commit c856509759

View File

@ -17,10 +17,7 @@ macro_rules! impl_zeroes{
let radicand=a1.[<wide_mul_ $n _ $n>](a1)-a2.[<wide_mul_ $n _ $n>](a0)*4; let radicand=a1.[<wide_mul_ $n _ $n>](a1)-a2.[<wide_mul_ $n _ $n>](a0)*4;
match radicand.cmp(&Fixed::<{$n*2},{$n*2*32}>::ZERO){ match radicand.cmp(&Fixed::<{$n*2},{$n*2*32}>::ZERO){
Ordering::Greater=>{ Ordering::Greater=>{
//start with f64 sqrt
//failure case: 2^63 < sqrt(2^127)
let planar_radicand=radicand.sqrt().halve_precision(); let planar_radicand=radicand.sqrt().halve_precision();
//TODO: one or two newtons
//sort roots ascending and avoid taking the difference of large numbers //sort roots ascending and avoid taking the difference of large numbers
match (a2pos,Self::ZERO<a1){ match (a2pos,Self::ZERO<a1){
(true, true )=>[Ratio::new(-a1-planar_radicand,a2*2),Ratio::new(a0*2,-a1-planar_radicand)].into(), (true, true )=>[Ratio::new(-a1-planar_radicand,a2*2),Ratio::new(a0*2,-a1-planar_radicand)].into(),