octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Octave-bug-tracker] [bug #37880] Make factor to not show wrong answ


From: Doug Stewart
Subject: Re: [Octave-bug-tracker] [bug #37880] Make factor to not show wrong answers for large numbers
Date: Mon, 30 Sep 2013 09:52:07 -0400

See bug #37830

octave-3.2.4:1> bitmax
ans =  9.0072e+15
octave-3.2.4:2> factor(bitmax)
ans =

       6361      69431   20394401

octave-3.2.4:3> prod(ans)
ans =  9.0072e+15
octave-3.2.4:4> factor(bitmax+1)
ans =

 Columns 1 through 20:

   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2

 Columns 21 through 40:

   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2
Columns 41 through 53:

   2   2   2   2   2   2   2   2   2   2   2   2   2

octave-3.2.4:5> prod(ans)
ans =  9.0072e+15



 octave-3.2.4:6> factor(bitmax+2)
ans =

 Columns 1 through 20:

   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2

 Columns 21 through 40:

   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2

 Columns 41 through 53:

   2   2   2   2   2   2   2   2   2   2   2   2   2

octave-3.2.4:7> prod(ans)
ans =  9.0072e+15
 


octave-3.2.4:6> factor(bitmax+2)
ans =

 Columns 1 through 20:

   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2

 Columns 21 through 40:

   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2   2

 Columns 41 through 53:

   2   2   2   2   2   2   2   2   2   2   2   2   2

octave-3.2.4:7> prod(ans)
ans =  9.0072e+15


octave-3.2.4:8> factor(bitmax+200)
ans =

   2.0000e+00   2.0000e+00   2.0000e+00   8.9000e+01   6.9490e+03   1.8205e+09

octave-3.2.4:9> prod(ans)
ans =  9.0072e+15
octave-3.2.4:10> factor(bitmax+20011)
ans =

           2          71         107         919   645063007

octave-3.2.4:11> prod(ans)
ans =  9.0072e+15



I don't know what matlab does.

I understand that the user should not ask such a question, but they do.
So what should we do when they do ask?

I think we should worn them, and this is what the patch does.

Doug



On Sun, Sep 29, 2013 at 9:34 PM, Mike Miller <address@hidden> wrote:
Update of bug #37880 (project octave):

                Category:                    None => Octave Function
                  Status:                    None => Need Info

    _______________________________________________________

Follow-up Comment #1:

Can you paste an example with input and output parameters of what problem this
patch is addressing? And what does Matlab do with the same example?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37880>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




--
DAS

https://linuxcounter.net/user/206392.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]