Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spec/functions/number.md
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ such as the number of fraction, integer, or significant digits.
A "digit size option" is an _option_ value that the _function_ interprets
as a small integer value greater than or equal to zero.
Implementations MAY define an upper limit on the _resolved value_
of a digit size option option consistent with that implementation's practical limits.
of a digit size option consistent with that implementation's practical limits,
as long as all integer values from 0 to 99 (inclusive) are supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

99 is way beyond the significant digits supported by an IEEE754 double. If we are going to require minimal values, it shouldn't be more than needed with double, which means it may vary according to the option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this isn't the right fix. I think what you're trying to say is maybe:

Suggested change
as long as all integer values from 0 to 99 (inclusive) are supported.
of a digit size option consistent with that implementation's practical limits.
Implementations that do so MUST emit an _Unsupported Operation_ error.
The literal values for integers from 0 to 99 (inclusive) MUST NOT produce
a _Bad Option_ error.

(Note that your text has "option option")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intent here was to clarify the general case, but arguably that does complicate matters; the current language allows more clearly for an implementation to define a different upper bound for each digit size option.

The "option option" text is currently in the spec; we should fix that separately if discarding this change.


In most cases, the value of a digit size option will be a string that
encodes the value as a non-negative integer.
Expand Down