On Saturday, April 12, 2014 1:02:46 AM UTC-7, Sergey Kirpichev wrote:
>
> On Fri, Apr 04, 2014 at 08:33:59AM -0700, Richard Fateman wrote: 
> >    I have no idea what evaluate=False means.  I am guessing what Add(  ) 
> >    means. 
>
> This example was actually for other sympy developers.  Think about 
> Add(2, 2, evaluate=False) as a poor-man's analog of the Mathematica 
> Hold[2+2]. 
>
That's awful.
Lisp  would use the syntax (+ 2 2).    If typed into a read-eval-print loop 
you would get 4.
If you typed (quote(+ 2 2))  you would get the symbolic expression (+ 2 2).
A keyboard shortcut for (quote(+ 2 2))   is    '(+ 2 2)

I'm sure you could come up with an infix version of Lisp's quote.

 

>
> >    But in any case leaving 
> >    out floats seems particularly hazardous because:   Floats are already 
> >    around. 
>
> You totally miss the point.  I'm against using these "inexact" numbers 
> in symbolic context, especially if we assume that some algebraic 
> properties are valid for any expression (associativity for the provided 
> above example). 
>

I think you are missing my point, which is that these numbers are not 
inexact
at all. They are precise numbers on the real line.   If you assume that this
finite set of "binary rationals"   (sometimes called dyadic numbers) is 
closed
under various operations, you may encounter difficulties. However, there is
nothing wrong with using them as input values, or when appropriate, output
values.   If you choose to do operations using finite-precision arithmetic 
typical
of scientific computing, there are lots of things to consider.  

Saying "sympy does symbolic stuff and will ignore floats" is appropriate if
you wish to exclude a large portion of potential users of sympy.  Why?
Well, consider all the computer algebra systems in existence.  Would they
be easier to build if they excluded floats?  Yes.  and yet they include 
floats.
And so should sympy...



For amusement, I wrote a (lisp) package that does binary rational 
arithmetic,
representing numbers as pairs. An odd integer of arbitrary length*, and a
second integer representing a power of two.     *Except for zero, which is 
0,0.

If anyone cares for a copy, ask and  I'll mail you one.  Later I might post 
it.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/08a1d529-45cc-4522-a93b-8750935f2bcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to