Skip to main content
assistive.skiplink.to.breadcrumbs
assistive.skiplink.to.header.menu
assistive.skiplink.to.action.menu
assistive.skiplink.to.quick.search
Log in
Confluence
Spaces
Hit enter to search
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
Available Gadgets
About Confluence
Log in
SEI CERT Oracle Coding Standard for Java
Pages
Boards
Space shortcuts
Dashboard
Secure Coding Home
Android
C
C++
Java
Perl
Page tree
Browse pages
Configure
Space tools
View Page
A
t
tachments (0)
Page History
Page Information
View in Hierarchy
View Source
Export to PDF
Export to Word
Pages
…
SEI CERT Oracle Coding Standard for Java
2 Rules
Rule 03. Numeric Types and Operations (NUM)
Page Information
Title:
Rule 03. Numeric Types and Operations (NUM)
Author:
David Svoboda
Feb 25, 2011
Last Changed by:
David Svoboda
Mar 15, 2022
Tiny Link:
(useful for email)
https://wiki.sei.cmu.edu/confluence/x/zDZGBQ
Export As:
Word
·
PDF
Incoming Links
SEI CERT Oracle Coding Standard for Java (9)
Page:
NUM10-J. Do not construct BigDecimal objects from floating-point literals
Page:
NUM03-J. Use integer types that can fully represent the possible range of unsigned data
Page:
NUM01-J. Do not perform bitwise and arithmetic operations on the same data
Page:
NUM04-J. Do not use floating-point numbers if precise computation is required
Page:
NUM00-J. Detect or prevent integer overflow
Page:
NUM11-J. Do not compare or inspect the string representation of floating-point values
Page:
NUM08-J. Check floating-point inputs for exceptional values
Page:
NUM09-J. Do not use floating-point variables as loop counters
Page:
NUM07-J. Do not attempt comparisons with NaN
Hierarchy
Parent Page
Page:
2 Rules
Children (13)
Page:
NUM00-J. Detect or prevent integer overflow
Page:
NUM01-J. Do not perform bitwise and arithmetic operations on the same data
Page:
NUM02-J. Ensure that division and remainder operations do not result in divide-by-zero errors
Page:
NUM03-J. Use integer types that can fully represent the possible range of unsigned data
Page:
NUM04-J. Do not use floating-point numbers if precise computation is required
Page:
NUM07-J. Do not attempt comparisons with NaN
Page:
NUM08-J. Check floating-point inputs for exceptional values
Page:
NUM09-J. Do not use floating-point variables as loop counters
Page:
NUM10-J. Do not construct BigDecimal objects from floating-point literals
Page:
NUM11-J. Do not compare or inspect the string representation of floating-point values
Show all...
Page:
NUM12-J. Ensure conversions of numeric types to narrower types do not result in lost or misinterpreted data
Page:
NUM13-J. Avoid loss of precision when converting primitive integers to floating-point
Page:
NUM14-J. Use shift operators correctly
Hide...
Labels
Global Labels (3)
num
rule-list
section
Recent Changes
Time
Editor
Mar 15, 2022 09:46
David Svoboda
View Changes
Mar 11, 2020 12:55
David Svoboda
View Changes
Nov 21, 2018 14:11
Derek Leung
View Changes
Nov 20, 2018 14:34
Derek Leung
View Changes
Nov 20, 2018 13:50
Derek Leung
View Page History
Outgoing Links
External Links (3)
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
SEI CERT Oracle Coding Standard for Java (1)
Home page:
SEI CERT Oracle Coding Standard for Java
Overview
Content Tools
{"serverDuration": 104, "requestCorrelationId": "2a9f03eeb2454bb3"}