Skip to content

Commit b143c25

Browse files
Content dev
1 parent 1fc1f3f commit b143c25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ layout: learningpathall
88

99
## Review of floating-point numbers
1010

11-
If you are unfamiliar with floating-point number representation, you can review the Learning Path [Learn about integer and floating-point conversions](/learning-paths/cross-platform/integer-vs-floats/introduction-integer-float-types/). It covers data types and conversions.
11+
If you are new to floating-point numbers, for some background information, see the Learning Path [Learn about integer and floating-point conversions](/learning-paths/cross-platform/integer-vs-floats/introduction-integer-float-types/). It covers data types and conversions.
1212

1313
Floating-point numbers represent real numbers using limited precision, enabling efficient storage and computation of decimal values with varying degrees of precision. In C/C++, floating-point variables are created with keywords such as `float` or `double`. The IEEE 754 standard, established in 1985, defines the most widely used format for floating-point arithmetic, ensuring consistency across hardware and software.
1414

content/learning-paths/cross-platform/floating-point-rounding-errors/how-to-2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ layout: learningpathall
1010

1111
Although both x86 and Arm generally follow the IEEE 754 standard for floating-point representation, their behavior in edge cases — like overflow and truncation — can differ due to implementation details and instruction sets.
1212

13-
You can see this by comparing an example application on both an x86-64 and an AArch64 (Arm64) Linux system.
13+
You can see this by comparing an example application on both an x86 and an Arm Linux system.
1414

1515
Run this example on any Linux system with x86 and Arm architecture; on AWS, use EC2 instance types `t3.micro` and `t4g.small` with Ubuntu 24.04.
1616

@@ -85,7 +85,7 @@ As you can see, there are several cases where different behavior is observed. Fo
8585

8686
The above differences show that explicitly checking for specific values will lead to unportable code.
8787

88-
For example, consider the function below. In the example below, the code checks whether the casted result is `0`. This can be misleading — on x86, casting an out-of-range floating-point value to `uint32_t` may wrap to `0`, while on Arm it may behave differently. Relying on these results makes the code unportable.
88+
For example, the function below checks if the casted result is `0`. This can be misleading — on x86, casting an out-of-range floating-point value to `uint32_t` may wrap to `0`, while on Arm it may behave differently. Relying on these results makes the code unportable.
8989

9090

9191

0 commit comments

Comments
 (0)