FIND YOUR NEXT FEW LINES

Results for “Numeric parsing & calculations”

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

232 snippets foundClear filters
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
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
RustErrors & optional values

Add context to a parsing failure

Add context to a parsing failure in a complete Rust program using the standard library.

Rust✓ Tested
jQueryAnimation completion

Animate a numeric CSS property

jQuery: animate interpolates supported numeric properties to their final values.

jQuery✓ Tested
AngularTemplate-driven forms

Bind a numeric input value

Bind a numeric input value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Bind a numeric style with units

Bind a numeric style with units with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaStream transformations

Calculate several numeric stream statistics

Java: Use summaryStatistics to calculate count, sum, minimum, maximum, and average in one pass.

Java✓ Tested
Bash ScriptsArguments & decisions

Choose among several numeric ranges

Bash Scripts: An if-elif chain evaluates branches in order and executes the first match.

Bash Scripts✓ Tested
PythonNumbers & calculations

Compare floating-point calculations with tolerance

Python: Use isclose instead of exact equality for results affected by floating-point rounding.

Python✓ Tested
PythonGetting Started

Convert known numeric text to an integer

Python: Convert a trusted literal to an integer before adding. Validate external input before converting it.

Python✓ Tested
C#Getting Started

Convert known numeric text to an integer

C#: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C#✓ Tested