Skip to content

Commit c701f46

Browse files
amartini51Colleen Toporek
andcommitted
Incorporate editorial review
Edits from <rdar://162699805> Co-authored-by: Colleen Toporek <colleen_toporek@apple.com>
1 parent 75c996b commit c701f46

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

TSPL.docc/LanguageGuide/TheBasics.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -490,12 +490,12 @@ you use the `Int` type described below.
490490

491491
Integer types behave like most arithmetic you do by hand;
492492
integer math produces results without approximating.
493-
This makes integers suitable for counting
493+
These characteristics make integers suitable for counting
494494
and other calculations that represent exact amounts ---
495495
for example,
496496
finding the longest line in a text file,
497497
applying a score multiplier in a game,
498-
or adding up prices on a receipt.
498+
or totaling prices on a receipt.
499499

500500
Although integers don't have a fractional component,
501501
you can use integers to represent quantities with fractions
@@ -513,7 +513,7 @@ before the last two digits.
513513
> For calculations in a regulated area like finance or construction,
514514
> or in a domain that has an expectation of high-precision results,
515515
> you might need a special-purpose numeric type
516-
> that implements behaviors such as rounding and truncation
516+
> that implements behaviors such as rounding and truncation,
517517
> according to that area's requirements.
518518
519519
### Integer Bounds
@@ -587,18 +587,18 @@ that support different sizes of numbers,
587587
just like it has different sizes of integers.
588588
If you don't need to specify an exact size, use `Double`.
589589
Otherwise,
590-
use the type whose name includes the needed size,
590+
use the type that includes the needed size in its name,
591591
such as `Float16` or `Float80`.
592592
Following common terminology for floating-point math,
593593
`Float` uses 32 bits and `Double` uses 64 bits.
594594
You can also write these types as `Float32` or `Float64`.
595595
For example,
596596
graphics code often uses `Float` to match the GPU's fastest data type.
597-
Some floating-point types are only supported by certain platforms,
597+
Some floating-point types are supported by only certain platforms,
598598
but `Float` and `Double` are available on all platforms.
599599

600600
Floating-point numbers let you work with
601-
both very small and very large numbers,
601+
very small and very large numbers,
602602
but can't represent every possible value in that range.
603603
Unlike integer calculations,
604604
which always produce an exact result,
@@ -635,7 +635,7 @@ or if the calculations you're doing
635635
require exact results
636636
and don't call for the special values listed above,
637637
a floating-point number might not be the right data type.
638-
Consider using fixed-point numbers instead
638+
Consider using fixed-point numbers instead,
639639
as described in <doc:TheBasics#Integers>.
640640

641641
## Type Safety and Type Inference

0 commit comments

Comments
 (0)