Re: Wiki update
Bill Frantz <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <r314ps-1066i-567FEA98C54646DEB7779042BDB6BF3B@Bill-Frantzs-MacBook-Pro.local> |
On 3/11/11 at 17:47, kpreid-M/[email protected] (Kevin Reid) wrote: >I've updated this to use the best choice in modern E: > >return Math."abs(double)"(value) > >>Note that abs() is probably a bad example. Coding abs directly >>in E would give you an abs which works with any value that >>supports " value < 0" and "- value". > >It is a doubly bad example: abs is a method on numbers, and >Math is unsafe so it is unlikely to be something that a >beginner would reach for unless they had need of a specific >method only available in it. > >Can you suggest a method from Math that is plausibly useful >given the existant methods on float64s (e.g. a better >algorithm for numeric stability or edge cases)? Perhaps I'm being blind, but the only place I know to get trig functions (sin, cos, etc.) is from java.lang.Math. Trying to use E from just the documentation is a bit frustrating, but I think it is a good exercise for improving the documentation. Cheers - Bill ----------------------------------------------------------------------- Bill Frantz |Security, like correctness, is| Periwinkle (408)356-8506 |not an add-on feature. - Attr-| 16345 Englewood Ave www.pwpconsult.com |ibuted to Andrew Tannenbaum | Los Gatos, CA 95032