Re: tcl-math(8.5): big-doubles? how do you do it?



Andreas Leitgeb wrote:
The range of doubles goes up to about 1e308.
Still, expr {sqrt(10**600)} correctly gives me 1e+300.
How does it handle the too-large-for-double argument?

Use the Source, Luke. :^)

ExprSqrtFunc() is in tclBasic.c, and I don't think it's too
tricky to follow.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.



Relevant Pages

  • Re: failure in: expr $a ne $b
    ... Andreas Leitgeb wrote: ... > % expr ... where expr's otherwise successful heuristics fail even ... > with currently valid barewords. ...
    (comp.lang.tcl)
  • Re: Brace your [expr] commands
    ... Andreas Leitgeb wrote: ... where expr is used in examples without braces on sf? ... throughout the tutorial - I intend to do something about that this weekend, but a sf.net bug report would be useful. ...
    (comp.lang.tcl)
  • Re: Construct request
    ... Andreas Leitgeb wrote: ... : Victor's answer is principially correct, ... always place the argument to expr into curly braces, ... where doing subsitution before expr sees ...
    (comp.lang.tcl)