Talk:Square root algorithms: Difference between revisions

Content deleted Content added
typo
m Archiving 2 discussion(s) to Talk:Methods of computing square roots/Archive 1) (bot
Line 28:
 
That cryptic constant is actually a composite of three bitfields, and twiddling it requires some understanding of what those fields are. It would be clearer, but a few more operations, to do that line as a pair of bitfield extract/inserts. But we're saving divides in the subsequent iterations, so the extra 1-cycle operations are a wash.
 
== {=3 } =4 ==
 
In procedure int32_t isqrt(int32_t n)
* 3 left curly brackets
* 4 right curly brackets [[User:Jumpow|Jumpow]] ([[User talk:Jumpow|talk]]) 20:37, 21 December 2021 (UTC)
 
:I tried to fix it. Is it OK now? [[User:JRSpriggs|JRSpriggs]] ([[User talk:JRSpriggs|talk]]) 22:57, 22 December 2021 (UTC)
:: Yes, now OK [[User:Jumpow|Jumpow]] ([[User talk:Jumpow|talk]]) 21:33, 4 January 2022 (UTC)
 
== Undefined behaviour ==
Line 53 ⟶ 44:
:This basically says, 'you may use a union to reinterpret the bits of one type into another but we're not going to promise that the new interpretation will be valid'
:I will say that the C code in this article is rather clunky and may benefit from a bitfield to separate the different sections of the float representation so it is easier to read and understand, but I will have to flatly disagree with you that <code>memcpy() </code>is more appropriate than a union in this code snippet. [[User:WillisHershey|WillisHershey]] ([[User talk:WillisHershey|talk]]) 17:24, 25 September 2023 (UTC)
 
== binary method in c ==
 
I believe that the example that is given in C is what is referred to as the [http://totton.idirect.com/soroban/KojimaSq/ Chinese Abacus Method] - confirmation from [http://medialab.freaknet.org/martin/src/sqrt/ this article] and [http://medialab.freaknet.org/martin/src/sqrt/sqrt.imp code that appears to be the same algorithm.] <!-- Template:Unsigned IP --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/70.124.38.160|70.124.38.160]] ([[User talk:70.124.38.160#top|talk]]) 15:55, 18 April 2022 (UTC)</small> <!--Autosigned by SineBot-->
 
== Lucas sequence method - original research? ==