equal
deleted
inserted
replaced
368 hwSqr.QWordValue:= ((QWord(t.Round) * t.Round) shl 32) + QWord(t.Round) * t.Frac * 2 + ((QWord(t.Frac) * t.Frac) shr 32); |
368 hwSqr.QWordValue:= ((QWord(t.Round) * t.Round) shl 32) + QWord(t.Round) * t.Frac * 2 + ((QWord(t.Frac) * t.Frac) shr 32); |
369 end; |
369 end; |
370 |
370 |
371 function hwSqrt1(const t: hwFloat): hwFloat; |
371 function hwSqrt1(const t: hwFloat): hwFloat; |
372 const pwr = 8; // even value, feel free to adjust |
372 const pwr = 8; // even value, feel free to adjust |
373 rThreshold = 1 shl (pwr + 32); |
373 rThreshold: QWord = 1 shl (pwr + 32); |
374 lThreshold = 1 shl (pwr div 2 + 32); |
374 lThreshold: QWord = 1 shl (pwr div 2 + 32); |
375 var l, r: QWord; |
375 var l, r: QWord; |
376 c: hwFloat; |
376 c: hwFloat; |
377 begin |
377 begin |
378 hwSqrt1.isNegative:= false; |
378 hwSqrt1.isNegative:= false; |
379 |
379 |