Skip to content

New content: add section on ordinary fixed-point types to Numerics - #1371

Open
gusthoff wants to merge 24 commits into
AdaCore:mainfrom
gusthoff:dev/topic/content/courses/advanced-ada/ordinary-fixed-point-types/2026-06-26
Open

New content: add section on ordinary fixed-point types to Numerics#1371
gusthoff wants to merge 24 commits into
AdaCore:mainfrom
gusthoff:dev/topic/content/courses/advanced-ada/ordinary-fixed-point-types/2026-06-26

Conversation

@gusthoff

Copy link
Copy Markdown
Collaborator

No description provided.

@gusthoff gusthoff added the new section Section using new content label Jun 27, 2026
@gusthoff
gusthoff requested a review from swbaird June 27, 2026 11:23

@swbaird swbaird left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not approving because of check suppression misuse.

Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst Outdated
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst Outdated
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst Outdated
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst Outdated
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst Outdated
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst Outdated
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst Outdated
Comment thread content/courses/advanced-ada/parts/data_types/numerics.rst
@gusthoff
gusthoff requested a review from swbaird July 18, 2026 04:18
gusthoff added 24 commits July 31, 2026 16:31
Add a comprehensive "Ordinary fixed-point types" section to the
"Numerics" chapter of the "Advanced Ada" course.
Also: add admonition about fractional digits.
Move detail into an admonition
@gusthoff
gusthoff force-pushed the dev/topic/content/courses/advanced-ada/ordinary-fixed-point-types/2026-06-26 branch from fee1419 to ebbd5ff Compare July 31, 2026 14:32

@swbaird swbaird left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good. I particularly like the new Fine_Delta section, and avoiding the use of unsafe check suppression.

types are sometimes called binary fixed-point types.
In contrast, an ordinary fixed-point type's *small* is a power of two by
default. However, unlike for decimal fixed-point types |mdash| which always
use a power of ten |mdash| this isn't mandatory: if we use the :ada:`Small`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps "if we use the Small aspect" => "by specifying the Small aspect" ?
Not a big deal.

its parent type; the only constraint allowed in a subtype declaration is a
range constraint. Unlike derived types, subtype objects are directly
interchangeable with the parent type |mdash| no explicit conversion is needed.
its parent type; the only non-obsolescent constraint allowed in a subtype

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It might be better to not mention obsolescent precision constraints at all. Whatever you think is best.


.. _Adv_Ada_Ordinary_Fixed_Point_System_Fine_Delta:

System.Fine_Delta

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice new section!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new section Section using new content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants