Commit 3e18f72
committed
perldata: document binary/octal floating-point constants
This (possibly accidental) feature has had tests since commit
58be576 and bug fixes such as commit 2cb5a7e. See also the
discussion in GH issues Perl#16114 and Perl#14791, particularly jhi's comment in
<Perl#16114 (comment)>:
> Relatedly: I remember there being a known "loophole" so that the
> scanning code currently accidentally, falling naturally out of the
> implementation, is also doing "binary fp" and "octal fp". Ah yes:
>
> ./miniperl -wle 'print 0b11.1p0'
> 3.5
> ./miniperl -wle 'print 011.1p0'
> 9.125
>
> This is probably not documented anywhere. I can't now think of the
> right search terms to find any previous discussion, there was something
> about should this be rejected, or not. If not (as is currently the
> case), maybe this possibly should be tested, documented, and made
> official?
With the documentation in this patch and the existing tests, I guess the
feature is now official.
Fixes Perl#18664.1 parent fe38c5a commit 3e18f72
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
447 | 450 | | |
448 | 451 | | |
449 | 452 | | |
| |||
478 | 481 | | |
479 | 482 | | |
480 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
481 | 487 | | |
482 | 488 | | |
483 | 489 | | |
| |||
0 commit comments