Tagged articles
54 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Aug 28, 2025 · Fundamentals

Mastering Floating‑Point Computation on Resource‑Constrained MCUs

This article explains how microcontroller units (MCUs) handle floating‑point operations, covering IEEE‑754 representation, hardware versus software FPU approaches, performance and precision challenges, and a range of optimization techniques—from hardware selection and fixed‑point tricks to compiler flags and system‑level power management.

ARMFPUFixed-Point
0 likes · 10 min read
Mastering Floating‑Point Computation on Resource‑Constrained MCUs
IT Services Circle
IT Services Circle
Aug 26, 2025 · Fundamentals

What Is UE8M0? Unpacking FP8 and Fixed‑Point Numbers Behind DeepSeek V3.1

This article explains the meaning of UE8M0 by introducing fixed‑point (INT8) and floating‑point representations, showing how integers and decimals are stored in binary, describing the limitations of fixed‑point, the advantages of floating‑point scientific notation, and detailing the emerging FP8 formats such as E4M3 and E5M2 used in modern AI hardware.

AI hardwareFP8Fixed-Point
0 likes · 8 min read
What Is UE8M0? Unpacking FP8 and Fixed‑Point Numbers Behind DeepSeek V3.1
Architect's Must-Have
Architect's Must-Have
Jul 25, 2025 · Backend Development

Avoid Common BigDecimal Pitfalls in Java: 4 Critical Mistakes and Fixes

This article outlines four common pitfalls when using Java's BigDecimal for high‑precision calculations—constructing from floating‑point literals, using equals for comparison, losing precision in division, and rounding issues—and provides practical solutions such as using string constructors, compareTo, specifying scale and rounding mode.

BigDecimalfloating-pointprecision
0 likes · 5 min read
Avoid Common BigDecimal Pitfalls in Java: 4 Critical Mistakes and Fixes
AI Cyberspace
AI Cyberspace
Mar 29, 2025 · Fundamentals

Why FP32 Remains the Benchmark for Measuring AI Compute Power

This article explains scientific notation, the IEEE‑754 floating‑point standard, the structure of FP32 and FP64 numbers, and how computational power is measured using FLOPS, illustrating CPU and GPU FP32 performance calculations and why FP32 is the common benchmark for AI workloads.

CPUFP32GPU
0 likes · 17 min read
Why FP32 Remains the Benchmark for Measuring AI Compute Power
ITPUB
ITPUB
Mar 8, 2025 · Backend Development

Why Does 2.01 Turn Into 2.00? Avoid Double Precision Bugs in Money Calculations

The article explains how using double for monetary values can cause precision loss—turning 2.01 into 2.00—illustrates the binary representation issue, demonstrates failing code, and presents a robust solution using Java's BigDecimal with sample conversion methods and performance tests.

BigDecimalMoneyfloating-point
0 likes · 6 min read
Why Does 2.01 Turn Into 2.00? Avoid Double Precision Bugs in Money Calculations
FunTester
FunTester
Mar 3, 2025 · Backend Development

Avoid These Hidden Go Pitfalls: Octal Literals, Integer Overflow, Float Comparison, Slices & Maps

This article reveals thirteen subtle Go programming mistakes—from octal literals and integer overflow to floating‑point comparison, slice length vs. capacity, map initialization, and value copying—providing clear explanations, real‑world analogies, and concrete best‑practice code fixes to prevent bugs and performance issues.

Gobest practicesfloating-point
0 likes · 14 min read
Avoid These Hidden Go Pitfalls: Octal Literals, Integer Overflow, Float Comparison, Slices & Maps
macrozheng
macrozheng
Feb 25, 2025 · Fundamentals

Why double Is Inaccurate and How to Use BigDecimal Correctly in Java

This article explains why double precision numbers cannot represent many decimal values exactly, how BigDecimal achieves precise arithmetic through unscaled values and scale, and the proper ways to construct BigDecimal objects to avoid precision loss in Java applications.

BigDecimalfloating-pointprecision
0 likes · 10 min read
Why double Is Inaccurate and How to Use BigDecimal Correctly in Java
php Courses
php Courses
Jan 13, 2025 · Backend Development

Using PHP is_float() to Detect Floating‑Point Numbers

This article explains PHP's is_float() function, covering its syntax, behavior, practical usage, and provides multiple code examples demonstrating how to detect floating‑point numbers and combine the check with conditional logic in real‑world applications.

floating-pointis_floattype checking
0 likes · 5 min read
Using PHP is_float() to Detect Floating‑Point Numbers
IT Services Circle
IT Services Circle
Jun 14, 2024 · Fundamentals

Understanding Floating‑Point Precision and Common Pitfalls in Java

The article explains why comparing floating‑point numbers with == in Java often yields unexpected results, describes the IEEE‑754 representation of float and double, demonstrates common pitfalls through code examples, and provides step‑by‑step methods for converting decimal fractions to binary.

IEEE-754binary conversionfloating-point
0 likes · 10 min read
Understanding Floating‑Point Precision and Common Pitfalls in Java
IT Services Circle
IT Services Circle
Dec 23, 2023 · Fundamentals

Understanding Floating‑Point Precision Issues in Python and How to Handle Them

The article explains why Python’s 0.1 + 0.2 does not equal 0.3 due to binary representation limits, discusses the impact of tiny rounding errors on equality checks, and recommends using tolerance thresholds or the Decimal module (initialized with strings) for accurate numeric computations, especially in finance.

DecimalNumerical ComparisonPython
0 likes · 3 min read
Understanding Floating‑Point Precision Issues in Python and How to Handle Them
360 Quality & Efficiency
360 Quality & Efficiency
Sep 1, 2023 · Fundamentals

Understanding Floating-Point Representation, Issues, and Solutions

This article explains how floating‑point numbers are represented in computers using IEEE‑754, illustrates conversion from decimal to binary, describes single‑ and double‑precision formats, outlines common precision, rounding, comparison, overflow, and associativity problems, and presents practical solutions such as high‑precision decimal types, integer scaling, and specialized libraries.

DecimalIEEE754Software Testing
0 likes · 9 min read
Understanding Floating-Point Representation, Issues, and Solutions
php Courses
php Courses
Aug 15, 2023 · Backend Development

Using PHP fmod() Function to Compute Floating‑Point Remainder

The article explains PHP's fmod() function for calculating the remainder of two floating‑point numbers, describes its syntax and parameter roles, provides multiple code examples—including handling of zero divisors and negative values—and notes that it returns a float or NAN when appropriate.

PHPfloating-pointfmod
0 likes · 4 min read
Using PHP fmod() Function to Compute Floating‑Point Remainder
Liangxu Linux
Liangxu Linux
May 24, 2023 · Fundamentals

Why 0.1 + 0.2 Gives 0.30000000000000004 – Inside 64‑bit Floating‑Point Math

This article explains why adding the decimal numbers 0.1 and 0.2 in binary floating‑point arithmetic yields the surprising result 0.30000000000000004, by detailing the exact 64‑bit representations, the rounding‑to‑nearest‑even rule, and step‑by‑step Python calculations that expose the underlying IEEE‑754 mechanics.

IEEE-754PythonRounding
0 likes · 10 min read
Why 0.1 + 0.2 Gives 0.30000000000000004 – Inside 64‑bit Floating‑Point Math
Sanyou's Java Diary
Sanyou's Java Diary
Dec 5, 2022 · Backend Development

Avoid Costly Bugs: Mastering BigDecimal Pitfalls in Java

This article explains why using Java's BigDecimal is essential for precise financial calculations, outlines four common pitfalls—including floating-point errors, equality comparison, scale handling, and string conversion—and provides practical best-practice solutions with code examples and rounding mode guidance.

BigDecimalFinancial-CalculationsRoundingMode
0 likes · 14 min read
Avoid Costly Bugs: Mastering BigDecimal Pitfalls in Java
IT Services Circle
IT Services Circle
Aug 30, 2022 · Backend Development

Understanding Java BigDecimal: Solving Floating‑Point Precision Problems

This article explains why floating‑point numbers lose precision in binary representation, demonstrates the issue with Java float examples, and shows how to use the BigDecimal class—including creation, arithmetic operations, scaling, and proper equality comparison—to achieve exact decimal calculations in Java applications.

ArithmeticBigDecimalComparison
0 likes · 8 min read
Understanding Java BigDecimal: Solving Floating‑Point Precision Problems
Cognitive Technology Team
Cognitive Technology Team
Jul 30, 2022 · Fundamentals

Common Pitfalls of java.math.BigDecimal and How to Avoid Them

This article explains several common mistakes when using Java's BigDecimal—such as constructing it with a double, using valueOf, relying on equals for comparison, and misusing round—and provides correct alternatives like string constructors, valueOf with proper precision, compareTo, and setScale for reliable arithmetic.

BigDecimalbest practicesfloating-point
0 likes · 6 min read
Common Pitfalls of java.math.BigDecimal and How to Avoid Them
Programmer DD
Programmer DD
Jun 8, 2022 · Fundamentals

Why BigDecimal Can Lose Precision: A Real-World Checkout Failure Explained

This article analyzes a checkout‑system outage caused by BigDecimal precision loss, reproduces the bug with Java code, explains the underlying double‑to‑long conversion issue, and recommends using String‑based construction for accurate monetary calculations.

BigDecimalFinancial-Calculationsfloating-point
0 likes · 6 min read
Why BigDecimal Can Lose Precision: A Real-World Checkout Failure Explained
Java Captain
Java Captain
Jun 7, 2022 · Fundamentals

Understanding BigDecimal Precision Issues in Monetary Calculations and a Utility Class for Accurate Operations

This article explains why using floating‑point types with BigDecimal can cause precision loss in financial calculations, demonstrates the problem with sample code, analyzes the underlying double‑to‑long conversion, and provides a reusable Java utility class to perform accurate arithmetic with BigDecimal.

BigDecimalFinancialfloating-point
0 likes · 8 min read
Understanding BigDecimal Precision Issues in Monetary Calculations and a Utility Class for Accurate Operations
JavaScript
JavaScript
Jan 4, 2022 · Frontend Development

Why parseInt Returns Unexpected Results and How to Use It Correctly

This article explains how JavaScript's parseInt function works, its handling of radix and floating‑point numbers, why it produces surprising results with very small values, and recommends safer alternatives like Math.floor for extracting integer parts.

JavaScriptMath.floorfloating-point
0 likes · 5 min read
Why parseInt Returns Unexpected Results and How to Use It Correctly
ELab Team
ELab Team
Dec 15, 2021 · Fundamentals

Unveiling the Magic of Fast Inverse Square Root: How 0x5f3759df Powers Game Physics

This article demystifies the fast inverse square root algorithm used in games, explaining the origin of the infamous 0x5f3759df magic number, the underlying IEEE‑754 floating‑point representation, the evil bit‑hack, Newton iteration steps, and how these tricks accelerate vector normalization.

Fast Inverse Square Rootalgorithmbit hack
0 likes · 17 min read
Unveiling the Magic of Fast Inverse Square Root: How 0x5f3759df Powers Game Physics
Liangxu Linux
Liangxu Linux
Aug 27, 2021 · Fundamentals

The Legendary Intel FDIV Bug: How a Hidden Flaw Shook the Computing World

The 1994 Intel Pentium FDIV floating‑point bug, caused by a handful of zero entries in a 2048‑entry lookup table, remained hidden for years until a mathematician spotted anomalies, prompting a worldwide collaborative effort that ultimately produced a clever scaling fix and massive media attention.

FDIV bugIntelSoftware debugging
0 likes · 10 min read
The Legendary Intel FDIV Bug: How a Hidden Flaw Shook the Computing World
Top Architect
Top Architect
Jul 5, 2021 · Databases

MySQL Implicit Type Conversion Leads to Unexpected Query Results

This article explains how MySQL implicitly converts mismatched column types—such as comparing a VARCHAR column with a numeric literal—into floating‑point numbers, causing seemingly equal values to match, losing index usage, and potentially producing incorrect query results.

Implicit ConversionIndex Usagefloating-point
0 likes · 7 min read
MySQL Implicit Type Conversion Leads to Unexpected Query Results
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Feb 4, 2021 · Fundamentals

How to Correctly Create and Use BigDecimal in Java for Precise Calculations

BigDecimal provides precise arithmetic in Java, but its correct usage requires understanding its internal unscaled value and scale, avoiding the inaccurate BigDecimal(double) constructor, and preferring String or valueOf methods to accurately represent decimal numbers such as 0.1 in financial and e‑commerce applications.

BigDecimalFinancialfloating-point
0 likes · 9 min read
How to Correctly Create and Use BigDecimal in Java for Precise Calculations
Liangxu Linux
Liangxu Linux
Nov 4, 2020 · Fundamentals

Why 0.2 + 0.1 Equals 0.30000000000000004 in JavaScript and How IEEE‑754 Handles Decimal Fractions

JavaScript’s 0.2 + 0.1 yielding 0.30000000000000004 stems from binary floating‑point representation, where many decimal fractions cannot be expressed exactly; the article explains decimal‑to‑binary conversion, the repeating binary of 0.1, IEEE‑754 format, and how to avoid precision loss using BigDecimal in Java.

BigDecimalIEEE-754JavaScript
0 likes · 9 min read
Why 0.2 + 0.1 Equals 0.30000000000000004 in JavaScript and How IEEE‑754 Handles Decimal Fractions
Beike Product & Technology
Beike Product & Technology
Oct 14, 2020 · Fundamentals

Understanding IEEE‑754 Floating‑Point Precision Issues in JavaScript

This article explains why JavaScript’s Number type, which follows the IEEE‑754 double‑precision standard, can produce unexpected results such as 0.1 + 0.2 = 0.30000000000000004, demonstrates the binary representation of numbers like 2.5 and 0.1, and offers practical techniques and libraries to mitigate floating‑point errors.

IEEE754JavaScriptbig-number
0 likes · 8 min read
Understanding IEEE‑754 Floating‑Point Precision Issues in JavaScript
Selected Java Interview Questions
Selected Java Interview Questions
May 30, 2020 · Backend Development

Understanding Precision Loss in Java's BigDecimal and Proper Usage

The article explains why floating‑point arithmetic in Java loses precision, demonstrates how even BigDecimal can suffer when constructed from double values, and shows the correct practice of using the BigDecimal(String) constructor together with utility methods to perform accurate monetary calculations.

BigDecimalMonetary Calculationsfloating-point
0 likes · 9 min read
Understanding Precision Loss in Java's BigDecimal and Proper Usage
Weidian Tech Team
Weidian Tech Team
Jul 12, 2019 · Fundamentals

Why JavaScript Float Addition Is Inaccurate: Inside V8’s Machine Code

This article explains how the V8 JavaScript engine generates machine code for floating‑point addition on Intel x64, covering V8’s architecture, the IEEE‑754 representation that causes precision loss, and a step‑by‑step analysis of the relevant C++ source and the resulting addsd instruction.

JavaScriptMachine CodeV8
0 likes · 12 min read
Why JavaScript Float Addition Is Inaccurate: Inside V8’s Machine Code
Alibaba Cloud Developer
Alibaba Cloud Developer
Jun 19, 2019 · Backend Development

What’s New in the Updated Java Development Handbook? 21 Rules, Lock Pitfalls, and Float Tricks

The latest Java Development Handbook introduces 21 new coding rules, revises over a hundred guidelines, and adds clearer examples on lock handling, switch‑null checks, floating‑point comparisons, collection conversions, and guard statements, while inviting developers to download the free PDF and join a live discussion.

Code Examplescoding standardsconcurrency
0 likes · 9 min read
What’s New in the Updated Java Development Handbook? 21 Rules, Lock Pitfalls, and Float Tricks
Alibaba Cloud Developer
Alibaba Cloud Developer
Jun 19, 2019 · Backend Development

Explore the Updated Java Development Handbook: 21 New Rules & Key Code Pitfalls

The newly released Java Development Handbook introduces three major upgrades—21 new coding rules, over a hundred revisions, and richer examples—while offering practical guidance on lock handling, switch NPE avoidance, floating‑point comparisons, guard statements, and other common Java pitfalls, all available for free download.

coding standardsconcurrencyfloating-point
0 likes · 9 min read
Explore the Updated Java Development Handbook: 21 New Rules & Key Code Pitfalls
Alibaba Cloud Developer
Alibaba Cloud Developer
Jun 17, 2019 · Fundamentals

5 Tricky Java Questions That Reveal Hidden Pitfalls

This article presents five Java code snippets—covering floating‑point comparison, wrapper equality, switch handling of null, BigDecimal construction, and lock usage—and challenges readers to identify the correct outcomes, exposing common misconceptions and best‑practice solutions.

BigDecimalconcurrencyfloating-point
0 likes · 4 min read
5 Tricky Java Questions That Reveal Hidden Pitfalls
Youzan Coder
Youzan Coder
Oct 19, 2018 · Fundamentals

Understanding NaN in JavaScript: Representation and Comparison

JavaScript’s NaN represents undefined numeric results, appears when operations like Math.sqrt(-1) occur, has multiple binary forms, and is distinguished as Quiet or Signaling; because NaN !== NaN, comparisons rely on special checks such as isnan, with implementations varying across environments like V8 and Apple’s C library.

C libraryJavaScriptNaN
0 likes · 8 min read
Understanding NaN in JavaScript: Representation and Comparison
System Architect Go
System Architect Go
Dec 22, 2017 · Fundamentals

Understanding Floating-Point Precision Issues and Practical Solutions in Programming Languages

This article explains why all IEEE‑754 based languages suffer from floating‑point precision errors, illustrates common problematic calculations, and presents integer‑conversion techniques and library recommendations such as decimal.js to achieve accurate numeric results, especially for financial computations.

JavaScriptdecimal.jsfloating-point
0 likes · 4 min read
Understanding Floating-Point Precision Issues and Practical Solutions in Programming Languages
Baidu Intelligent Testing
Baidu Intelligent Testing
Dec 4, 2015 · Fundamentals

Debugging Floating‑Point Precision Differences in Query‑Diff Tests: A CPU Instruction Set Case Study (AVX vs SSE)

This article details a query‑diff test that revealed a 1% floating‑point precision difference after a module upgrade, describes the systematic investigation of environment, compilation, and CPU instruction‑set variations (AVX vs SSE), and presents conclusions and recommendations for preventing similar issues.

AVXCPUSSE
0 likes · 10 min read
Debugging Floating‑Point Precision Differences in Query‑Diff Tests: A CPU Instruction Set Case Study (AVX vs SSE)