Results for “value”
Small, practical examples. Search by task or narrow things down below.
Calculate with exact rational values
Python: Use Fraction for exact ratios rather than binary floating-point approximations.
Python✓ Tested
Calculate with integer values
Arduino / C: Calculate with integer values on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Call a function with a return value
Call a function with a return value using a complete Go program with explicit sample inputs.
Go✓ Tested
Capture a surrounding value in a closure
Capture a surrounding value in a closure in a complete Rust program using the standard library.
Rust✓ Tested
Capture configuration by value in a callable
C++: A value capture retains the value from lambda creation even if the original variable changes later.
C++✓ Tested
Check whether a floating-point value is finite
Check whether a floating-point value is finite in a complete Rust program using the standard library.
Rust✓ Tested
Check whether a value is a safe integer
JavaScript: Number.isSafeInteger also checks the exact-integer range supported by Number.
JavaScript✓ Tested
Check whether a value is a safe integer
TypeScript: Number.isSafeInteger also checks the exact-integer range supported by Number.
TypeScript✓ Tested
Choose an equality function for signal values
Choose an equality function for signal values with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Choose the smaller of two values
Arduino / C: Choose the smaller of two values on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Clamp a numeric value between bounds
Python: Combine min and max for a closed interval when lower is no greater than upper.
Python✓ Tested
Clamp a value to a range
Use C++17 clamp to bound a numeric value.
C++✓ Tested