Modifying the value of a float-like object

smichr smichr at gmail.com
Fri May 1 03:19:43 EDT 2009


On May 1, 11:13 am, smichr <smi... at gmail.com> wrote:
> Also, this approach is limited in that only variables can be arguments
> to functions, not node expressions. If x and d are variables, x/d
> becomes an expression and you cannot compute sin(x/d). Or am I missing
> something?
>

Note to self...it's best to restart with a fresh session if you've
been making modifications. everything appears to work fine without any
of the above observed problems:

>>> a=Number_with_uncert(3,1);y=a+cos(a);y.error
0.85888494187891229
>>> b=Number_with_uncert(4,1)
>>> cos(a/b)
<class '__main__.Semi_formal_expr_node'> object with result
0.731688868874 +- 0.213012112511

Sorry for the false alarm,
/c



More information about the Python-list mailing list