Results for “decimal”
Small, practical examples. Search by task or narrow things down below.
Round and format a decimal value
Round and format a decimal value in a complete Rust program using the standard library.
Rust✓ Tested
Round decimal amounts explicitly
Python: Build Decimal values from strings and choose a rounding rule explicitly.
Python✓ Tested
Sum the decimal digits of an unsigned integer
C: Repeated division and remainder extract digits without converting to text.
C✓ Tested
Calculate a SHA-256 content digest
Java: Hash UTF-8 bytes and format the result as lowercase hexadecimal.
Java✓ Tested
Convert between integer bases
JavaScript: Supply a radix when parsing a nondecimal integer string.
JavaScript✓ Tested
Convert between integer bases
TypeScript: Supply a radix when parsing a nondecimal integer string.
TypeScript✓ Tested
Print a floating-point value with fixed precision
Choose the number of decimal places in serial output.
float✓ Tested
Print integers in different bases
Inspect a byte in decimal, hexadecimal, and binary.
Serial✓ Tested
Sum values per category
Calculate a grouped total.
SUM✓ Tested