home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,695 of 10,432   
   Raymond Toy to All   
   Re: Maxima query   
   08 Nov 14 12:20:02   
   
   From: toy.raymond@gmail.com   
      
   >>>>> "Miros" == Miros   writes:   
      
       Miros> Martin  wrote:   
       >> If I run the following code:   
       >>   
       >> for i: 1 step 1 thru 25 do block   
       >> (b : float((1+sqrt(1+2*(i^2-i)))/2),   
       >> if b > floor(b)  then print(i,b) );   
       >>   
       >> then Maxima will correctly print values of i and b up to i = 25   
   excluding i   
       >> = 1,4 and 21 where b evaluates to an integer. However if I run:   
       >>   
       >> for i: 1 step 1 thru 25 do block   
       >> (b : float((1+sqrt(1+2*(i^2-i)))/2),   
       >> if b = floor(b)  then print(i,b) );   
       >>   
       >> then nothing is printed where I should now get the values that were   
   omitted   
       >> above.   
      
       Miros> Because in maxima 0=0.0 is false, you should replace  b = floor(b)   
   with   
       Miros> b-floor(b) = 0.0   
      
   No. "=" is syntactic equality. You want is(equal(b,floor(b))).   
      
   --   
   Ray   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca