Opened 7 years ago

Closed 5 years ago

#65 closed defect (fixed)

Precision indicators

Reported by: cowan Owned by: alexshinn
Priority: major Milestone:
Component: WG1 - Core Keywords:
Cc:

Description

R5RS requires that Scheme support five indicators for the precision of floating-point values, not only the default e but also s, f, d, and l. Only a few Schemes actually support more than one precision, so this is mostly noise. Shall we make it an optional feature?

Change History (9)

comment:1 Changed 7 years ago by cowan

The WG voted to make the precision indicators optional.

comment:2 Changed 7 years ago by cowan

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 7 years ago by alexshinn

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 7 years ago by alexshinn

  • Owner alexshinn deleted
  • Status changed from reopened to assigned

comment:5 Changed 7 years ago by alexshinn

  • Status changed from assigned to decided

comment:6 Changed 6 years ago by alexshinn

  • Owner set to alexshinn
  • Status changed from decided to writing

comment:7 Changed 6 years ago by alexshinn

There's nothing in particular to change here - the standard
already states:

Although Scheme allows a variety of written notations for
numbers, any particular implementation may support only
some of them.

I considered making the optionality more clear in the section
on precision indicators, but it already uses "may" for everything.
But it's a lot of text for something almost all implementations
ignore - suggestions welcome.

comment:8 Changed 6 years ago by cowan

The "may"s in 6.2.4 are not RFC 2119; they express what the user can do to achieve a certain result. Since the purpose of a standard is to define the agreement between users and implementers, the whole thing should be recast in terms of what implementations MUST, SHOULD, or MAY do. I just filed a ticket for RFC 2119 compliance.

Here's my suggestion:

In systems with inexact numbers of varying precisions it may be useful to specify the precision of a constant. For this purpose, implementations MAY accept numerical constants written with an exponent marker s, f, d, or l in place of e. The effect of these markers is implementation-defined.

comment:9 Changed 5 years ago by cowan

  • Resolution set to fixed
  • Status changed from writing to closed
Note: See TracTickets for help on using tickets.