Jonathan <gu...@uwosh.edu> writes:
> As a scientist who would actually use this for research if it worked well, I
> have some thoughts. The thing that would make me use this instead of my
> personally maintained list of constants is if there were a command to update
> the constants automagically from the NIST database.  You should also think 
> very
> carefully about how the uncertainty works as scientists will want to take that
> uncertainty and propagate it using gaussian error propagation through
> calculations.  It might be best to have constants as a list with the first
> value being the mean and the second the uncertainty.  A structure or object
> might work even better.  The trick would be to default to the mean value when
> doing calculations.
>
> I think this would be useful.

I think what Eviatar was suggesting is that constants with uncertainty
should be represented with Real Intervals, which is a data type that
stores a number as an interval of its possible values. When you perform
arithmetic on them, the bounds grow or shrink as you would expect::

    sage: RIF(1,2).str(style='brackets')
    '[1.0000000000000000 .. 2.0000000000000000]'
    sage: RIF(3,4).str(style='brackets')
    '[3.0000000000000000 .. 4.0000000000000000]'
    sage: (RIF(1,2) * RIF(3,4)).str(style='brackets')
    '[3.0000000000000000 .. 8.0000000000000000]'
    sage: (RIF(-1,1) * RIF(3,4)).str(style='brackets')
    '[-4.0000000000000000 .. 4.0000000000000000]'

Is this sufficient for your purposes? You could store a Gaussian
distribution with mean m and standard deviation s as RIF(m-s, m+s), say.

-Keshav

----
Join us in #sagemath on irc.freenode.net !

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to