Tag

absolute-value

1 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Aug 12, 2023 · Backend Development

Using PHP's abs() Function: Syntax, Examples, and Handling Floating‑Point Precision

This article explains PHP's abs() absolute‑value function, covering its syntax, basic integer and floating‑point examples, precision issues with very small numbers, and how to combine it with round() to obtain accurate results, while noting its limitation to numeric types.

Floating PointTutorialabs
0 likes · 4 min read
Using PHP's abs() Function: Syntax, Examples, and Handling Floating‑Point Precision
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 20, 2021 · Fundamentals

Understanding Java Math.abs and Handling Integer.MIN_VALUE Edge Cases

This article explains the concept of absolute value, demonstrates Java's Math.abs overloads for different primitive types, illustrates a common hashing use‑case that can fail when Integer.MIN_VALUE is processed, and shows how casting to long resolves the overflow problem.

HashCodeLongabsolute-value
0 likes · 5 min read
Understanding Java Math.abs and Handling Integer.MIN_VALUE Edge Cases
Laravel Tech Community
Laravel Tech Community
Jan 4, 2021 · Backend Development

PHP abs() Function – Returning the Absolute Value

This article explains PHP's abs() function, describing its numeric parameter, the type‑preserving return of the absolute value, and provides clear example code demonstrating usage with both integer and float inputs.

Exampleabsabsolute-value
0 likes · 1 min read
PHP abs() Function – Returning the Absolute Value