Skip to content
free
K
1
2
practice
Home
Math
English
Science
Social Studies
Contact
Language
English
Español
Sign In
/
High School Electives
/
Computer Science
/
Floating-Point Precision
Grade Level
Computer Science
HSCS.053 Floating-Point Precision
0%
Skill Level
🔴 Hard
00:00
Progress to Next Level
25% to Medium
Easy
Medium
Hard
Mastery
100%
A code review notes that a program formats a value to two decimals and then uses the formatted string to decide whether two calculations are equal. What is the best critique?
A
Two-decimal formatting proves the source values were exact cents.
B
Formatted strings are always more accurate than stored numbers.
C
Formatting is for presentation; equality logic should use exact domain units, decimals, or a tolerance appropriate to the computation.
D
The program should compare screenshots of the formatted numbers instead
Submit Answer