Talk:Roots of a quadratic function: Difference between revisions

→‎obscure algorithm ?: added a reference to show how different computer programming languages deal with infix operators with exponentiation.
m (corrected a misspelling, used indentations for responses, added a section header for the first talk topic to align the TOC.)
(→‎obscure algorithm ?: added a reference to show how different computer programming languages deal with infix operators with exponentiation.)
 
(2 intermediate revisions by 2 users not shown)
Line 8:
"do it better" ?
 
I clearly see <strike>come</strike> some of programs (Ada, and some marked as "translation of Ada") use
(b^2-4ac)/2*a,
there correct way is
Line 20:
: In the example above (2nd line) (-10<sup>6</sup>) isn't the same as -1e6. The former is -1,000,000 and the latter is +1,000,000. --[[User:Gerard Schildberger|Gerard Schildberger]] 18:11, 25 June 2011 (UTC)
 
::: Other way round surely: <math>-10^n</math> will always be positive when n is even. --Laurie Alvey 10:45, 19 May 2015 (UTC)
::: Nope. -1e6 = -1000000. And -10^6=-1000000 as well, except in some insane languages. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 17:35, 13 August 2020 (UTC)
 
:::: It all depends if the infix (negative) operator has more or less priority then the exponent operator. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 09:14, 13 November 2020 (UTC)
::: Other way round surely: <math>-10^n</math> will always be positive when n is even. --Laurie Alvey 10:45, 19 May 2015 (UTC)
 
:::: See: &nbsp; [[Exponentiation with infix operators in (or operating on) the base]].
 
== J example ==