FIND YOUR NEXT FEW LINES

Results for “numeric”

Small, practical examples. Search by task or narrow things down below.

131 snippets foundClear filters
CNumeric parsing & arithmetic

Parse an unsigned hexadecimal integer

C: Use an explicit base and check both range and full consumption.

C✓ Tested
PowerShellDates & numeric validation

Reject NaN and infinite values

PowerShell: Double.IsFinite excludes numeric values unsuitable for ordinary bounded calculations.

PowerShell✓ Tested
CNumeric parsing & arithmetic

Reject NaN and infinite values

C: isfinite detects whether a floating-point value is an ordinary finite number.

C✓ Tested
JavaPrecise numeric calculations

Reject nonfinite floating-point values

Java: Double.isFinite excludes both infinity and NaN.

Java✓ Tested
PowerShellDates & numeric validation

Round a decimal with a chosen midpoint rule

PowerShell: Use decimal input and an explicit rounding policy for a reproducible decimal result.

PowerShell✓ Tested
JavaPrecise numeric calculations

Round a decimal with an explicit rule

Java: Construct BigDecimal from text to avoid importing a binary floating-point approximation.

Java✓ Tested
CNumeric parsing & arithmetic

Round a halfway floating-point value

C: The C round function rounds halfway cases away from zero.

C✓ Tested
CNumeric parsing & arithmetic

Round downward and upward independently

C: floor and ceil round toward negative and positive infinity respectively.

C✓ Tested
C++Numeric parsing & calculations

Round halfway floating-point values away from zero

C++: std::round has an explicit halfway rule different from truncation.

C++✓ Tested
CNumeric parsing & arithmetic

Validate a complete floating-point input

C: strtod exposes both the stopping position and range errors; reject nonfinite results when required.

C✓ Tested
jQueryAnimation completion

Animate relative to the current value

jQuery: A plus-equals value adds to the current numeric CSS value.

jQuery✓ Tested
Bash ScriptsLoops & decisions

Check whether input is a nonnegative integer

Reject empty input and nonnumeric characters before arithmetic.

validation✓ Tested