Skip to content

Commit 3c75f34

Browse files
authored
Merge pull request #1219 from gusthoff/content/advanced_ada/review/editorial/numerics/20250504
Editorial changes: various improvements in chapter on numerics
2 parents e21dffd + b02e4f5 commit 3c75f34

File tree

1 file changed

+50
-15
lines changed

1 file changed

+50
-15
lines changed

content/courses/advanced-ada/parts/data_types/numerics.rst

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -379,27 +379,53 @@ and be guaranteed that :ada:`Nil` is equal to zero.
379379

380380
.. ::
381381

382-
.. _Adv_Ada_Numeric_Types:
382+
.. _Adv_Ada_Base_Type:
383383

384-
Numeric Types
385-
-------------
384+
Base type
385+
---------
386386

387387
.. todo::
388388

389389
Complete section!
390390

391-
- Recap of numeric types
391+
392+
.. ::
393+
394+
.. _Adv_Ada_Discrete_Numeric_Types:
395+
396+
Discrete Numeric Types
397+
----------------------
398+
399+
.. todo::
400+
401+
Complete section!
402+
403+
- Recap of discrete numeric types
392404
- Integer types
393-
- Floating-point types
394-
- Fixed-point types
395405
- Modular types
396406
- Standard types vs. compiler-specific types
397407
- e.g.: `Integer` vs. `Long_Long_Integer`
398-
- Rename sections on numeric type attributes!
399408

409+
.. ::
410+
411+
.. _Adv_Ada_Real_Numeric_Types:
412+
413+
Real Numeric Types
414+
------------------
415+
416+
.. todo::
417+
418+
Complete section!
419+
420+
- Recap of real numeric types
421+
- Floating-point types
422+
- Fixed-point types
400423

401-
Modular Types
402-
-------------
424+
425+
.. _Adv_Ada_Modular_Type_Attributes:
426+
427+
Attributes of Modular Types
428+
---------------------------
403429

404430
In the Introduction to Ada course, we've seen that Ada has two kinds of integer
405431
type: :ref:`signed <Intro_Ada_Integers>` and
@@ -672,8 +698,11 @@ In this example, the core of the algorithm is implemented in the
672698
by eight bits. We also use the :ada:`xor` operator.
673699

674700

675-
Floating-Point Types
676-
--------------------
701+
702+
.. _Adv_Ada_Floating_Point_Type_Attributes:
703+
704+
Attributes of Floating-Point Types
705+
----------------------------------
677706

678707
In this section, we discuss various attributes related to floating-point types.
679708

@@ -1600,8 +1629,10 @@ This is the reason why we see 1.3008896 x 10\ :sup:`7` instead of
16001629
:ada:`Float` type.
16011630

16021631

1603-
Fixed-Point Types
1604-
-----------------
1632+
.. _Adv_Ada_Fixed_Point_Type_Attributes:
1633+
1634+
Attributes of Fixed-Point types
1635+
-------------------------------
16051636

16061637
In this section, we discuss various attributes and operations related to
16071638
fixed-point types.
@@ -1611,8 +1642,8 @@ fixed-point types.
16111642
- :arm22:`3.5.10 Operations of Fixed Point Types <3-5-10>`
16121643
- :arm22:`A.5.4 Attributes of Fixed Point Types <A-5-4>`
16131644

1614-
Attributes of fixed-point types
1615-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1645+
Attributes of ordinary and decimal fixed-point types
1646+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16161647

16171648
Attribute: :ada:`Machine_Radix`
16181649
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -2033,6 +2064,8 @@ Here, the :ada:`T3_D3` has a precision of three digits. Therefore, to fit this
20332064
precision, 0.2774 is rounded to 0.277, and 0.2777 is rounded to 0.278.
20342065

20352066

2067+
.. _Adv_Ada_Big_Numbers:
2068+
20362069
Big Numbers
20372070
-----------
20382071

@@ -2695,6 +2728,8 @@ In this example, we retrieve the greatest common divisor of 145 and 25
26952728
(i.e.: 5).
26962729

26972730

2731+
.. _Adv_Ada_Big_Real_Quotients:
2732+
26982733
Big real and quotients
26992734
~~~~~~~~~~~~~~~~~~~~~~
27002735

0 commit comments

Comments
 (0)