🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 12-06-2021 06:44 AM
(578 views)
I've got two source tables. Both contain a numeric variable called SUM. I'll call them SUM_A and SUM_B.
SUM_A can sometimes be displayed using a scientific notation. SUM_B is always displayed as a plain number.
I need to add SUM_A to SUM_B. I've made the new variable SUM_TOTAL (format: comma20.) which uses this expression: SUM_A + SUM_B
When SUM_A uses a scientific notation, then the end result is always equal to SUM_B. Example:
How can I make SUM_TOTAL display SUM_A + SUM_B?
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try format BEST20.
--
Paige Miller
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
And when adding very small numbers to considerably large numbers, you will run into the limits of numeric precision. Keep in mind that only 15 to 16 decimal digits can be stored reliably in 8-byte real.