Message339282
| Author | mark.dickinson |
|---|---|
| Recipients | christian.heimes, mark.dickinson, rhettinger, scoder, stutzbach |
| Date | 2019-04-01.07:12:31 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1554102751.22.0.217568451762.issue36493@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
Special cases aside, I think this is a YAGNI. The "obvious" formulas `(a + b)/2)` and `0.5 * (a + b)` _do_ do exactly the right thing (including giving a perfectly correctly-rounded answer with round-ties-to-even on a typical IEEE 754-using machine) provided that subnormals and values very close to the upper limit are avoided. If you're doing floating-point arithmetic with values of size > 1e300, you've probably already got significant issues. I could see specialist uses for this, e.g., in a general purpose bisection algorithm, but I'm not convinced it's worth adding something to the math library just for that. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-04-01 07:12:31 | mark.dickinson | set | recipients: + mark.dickinson, rhettinger, scoder, christian.heimes, stutzbach |
| 2019-04-01 07:12:31 | mark.dickinson | set | messageid: <1554102751.22.0.217568451762.issue36493@roundup.psfhosted.org> |
| 2019-04-01 07:12:31 | mark.dickinson | link | issue36493 messages |
| 2019-04-01 07:12:31 | mark.dickinson | create | |