Skip to content

Commit 978bb92

Browse files
committed
Correction: scalefactor corresponds to small of the type
1 parent 9b7cd92 commit 978bb92

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3485,15 +3485,20 @@ types on the target machine.
34853485

34863486
The scalefactor is 1 (or 10\ :sup:`0`) for the :ada:`T0_D4` type and 0.01
34873487
(or 10\ :sup:`-2`) for the :ada:`T2_D6` type. As you have might have noticed,
3488-
this scalefactor corresponds to the *delta* we've used in the type declaration.
3488+
this scalefactor is equal to the *delta* we've used in the type declaration.
3489+
In actuality, however, the scalefactor is the *small* of the type |mdash|
3490+
which, as we've seen before, is equal to the *delta* for decimal fixed-point
3491+
types. (Later on, we see that this *detail* makes a difference for ordinary
3492+
fixed-point types.)
3493+
34893494
For example, if we multiple the integer representation of the real value by the
3490-
*delta*, we get the real value:
3495+
*small*, we get the real value:
34913496

34923497
+-------------+-------------------------------+
34933498
| Real value | :ada:`T2_D6` type |
34943499
| +-------------------------------+
34953500
| | Integer representation |
3496-
| | multiplied by *delta* |
3501+
| | multiplied by the *small* |
34973502
+=============+===============================+
34983503
| 1.00 | = 100 * 0.01 |
34993504
+-------------+-------------------------------+

0 commit comments

Comments
 (0)