Tagged articles
precision
95 articles · Page 1 of 1
This article explains how JavaScript's reduce method loses precision when summing large or many numbers due to floating-point rounding, introduces the new ES2026 Math.sumPrecise() method that avoids intermediate rounding errors, demonstrates its accuracy with examples like summing 1e20, 0.1, -1e20 and 1000 times 0.1, and notes current browser support.
ES2026IEEE 754JavaScript
0 likes · 6 min read

This article explains why PHP's IEEE 754 floating-point arithmetic causes 0.1 + 0.2 ≠ 0.3, demonstrates integer overflow issues near PHP_INT_MAX, and details correct approaches: tolerance-based comparison, integer fixed-decimal scaling, and arbitrary-precision extensions BCMath and GMP with string inputs.
BCMathGMPIEEE 754
0 likes · 12 min read

The article surveys ten community‑suggested approaches for representing monetary values in Java—ranging from using Long, BigDecimal, String, Protobuf, custom types, to following leadership or AI advice—highlighting each option’s rationale and trade‑offs such as precision, range, performance, and maintainability.
JavaLongMonetary
0 likes · 4 min read

The article dissects the long‑standing Java debate over using double versus BigDecimal for money, explaining that the choice hinges on required precision, rounding rules, and performance limits, and walks through floating‑point fundamentals, common pitfalls, and high‑accuracy summation techniques.
IEEE754JavaKahanSummation
0 likes · 19 min read

This article implements four timer scenarios — countdown, stopwatch, Pomodoro, and alarm — in HarmonyOS ArkUI, explaining design choices like setInterval vs Date.now() for precision, state machines for phase transitions, and lifecycle cleanup to avoid memory leaks.
AlarmArkUICountdown
0 likes · 36 min read

This article explores floating-point precision issues in HarmonyOS development, demonstrating how float's 7-digit limit corrupts sensor data, why double increases memory 30% and fails in Native calls, and why BigDecimal kills real-time performance, concluding with a scenario-based selection strategy and validation mechanism.
HarmonyOSNative interfacebigdecimal
0 likes · 10 min read

This article explains why using Java's BigDecimal for high‑precision calculations requires careful constructor selection, demonstrates the hidden errors of the double‑based constructor, shows how to format and compare values, and provides a utility class with safe arithmetic methods.
ArithmeticJavaNumberFormat
0 likes · 24 min read

The article explains why retrieval quality dominates RAG performance and outlines a rigorous evaluation framework—including prompt, ranked results, and ground‑truth annotations—and detailed metrics such as Precision, Recall, MAP@K, NDCG@K, MRR, and F‑scores, while discussing chunking strategies, embedding choices, hybrid retrieval, and CI/CD‑driven monitoring to ensure production reliability.
LLMNDCGRAG
0 likes · 12 min read

The article explains why adding 0.1 and 0.2 in Rust (and other IEEE‑754 languages) yields 0.30000000000000004, explores the binary representation limits of f64, introduces the ULP concept, and details how the Ryū algorithm produces the shortest correct decimal string for floating‑point numbers.
RustRyū algorithmULP
0 likes · 11 min read

This article explains how Java's BigDecimal class provides exact arithmetic for numbers beyond double's 16‑digit limit, demonstrates the pitfalls of using the double constructor with concrete examples, and guides developers through constructors, common methods, formatting, exception handling, and a utility class for high‑precision calculations.
ArithmeticJavaNumberFormat
0 likes · 27 min read

This article explains how using floating‑point numbers for money leads to precision loss, demonstrates common rounding pitfalls, and provides Go‑specific solutions—including integer cents and the high‑precision decimal library—to ensure accurate financial calculations.
DecimalFinancialGo
0 likes · 9 min read

This article explains how Java's BigDecimal class maintains exact decimal precision by scaling numbers to integers, detailing its internal fields, the add method implementation, and a concrete example that demonstrates the underlying computation steps.
Javabigdecimalfinance
0 likes · 6 min read

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

Floating‑point numbers cannot precisely represent many decimal values, leading to cumulative errors in financial calculations, so Java’s BigDecimal class is recommended for high‑precision arithmetic to avoid such inaccuracies and ensure reliable monetary computations.
Financial-CalculationsJavabigdecimal
0 likes · 2 min read

Alibaba Cloud Log Service (SLS) introduces a new "SQL Full‑Precision" mode that eliminates inaccurate results in massive log analyses by isolating resources, extending query time, and providing fine‑grained flow control, while outlining its use cases, limitations, and practical configuration steps.
aliyun-slsbig-datacloud-native
0 likes · 13 min read

This article explains the Java BigDecimal class, its internal fields, and how its addition method scales numbers to maintain precision, illustrated with code examples and debugging insights, concluding that BigDecimal performs arithmetic using scaled long integers to avoid precision loss.
ArithmeticJavabigdecimal
0 likes · 6 min read


ITPUBMar 8, 2025 · Backend Development
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.
JavaMoneybigdecimal
0 likes · 6 min read

This article explains the Java BigDecimal class, its internal fields and methods, demonstrates a test case, and analyzes the add operation to show how scaling numbers to long integers preserves exact precision in financial calculations.
ArithmeticBackendFinancial
0 likes · 6 min read

Python’s unexpected 0.1 + 0.2 = 0.30000000000000004 result stems from binary floating‑point representation limits defined by the IEEE 754 standard, and the article explains this issue, rounding modes, and practical solutions such as the decimal module, fractions, math.isclose, and high‑precision NumPy types.
IEEE 754NumPyPython
0 likes · 9 min read

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

The article explains the performance benefits of using FP8 for large‑model training, outlines three main categories of FP8‑related issues such as loss spikes, divergence, and downstream metric gaps, and introduces a dedicated FP8 debug tool with metrics like MSE, cosine similarity, underflow, and overflow to help diagnose and resolve these problems.
AIFP8NVIDIA
0 likes · 9 min read

A simple typo that changed a daily interest rate from 0.00006944444 to 0.00069444444 inflated calculated interest tenfold, went unnoticed because the author self‑approved the SQL update and testing only checked syntax, and the incident underscores the need for rigorous code review, testing, and change‑management procedures for critical data.
BackendSQLbug
0 likes · 12 min read

This article explains why Java's BigDecimal can guarantee lossless precision in financial calculations by examining its class definition, internal fields, example usage, and the detailed implementation of its add method, including scaling and long‑integer arithmetic.
JavaNumber Handlingbackend development
0 likes · 7 min read

The article explains how Java's BigDecimal class avoids precision loss by scaling numbers into integer representations, detailing its internal fields, the add method's branching logic, and a concrete test that demonstrates exact decimal addition for financial values.
IntegerArithmeticJavabigdecimal
0 likes · 6 min read

This article explains how Java's BigDecimal class preserves decimal precision by scaling numbers to long integers, detailing its internal fields, key methods, and step‑by‑step execution of an addition example to illustrate the underlying algorithm.
ArithmeticBackendbigdecimal
0 likes · 7 min read

This article explains why Java's BigDecimal class ensures loss‑free precision in financial calculations by examining its internal fields, demonstrating usage with a test method, and walking through the add method's scaling logic and integer‑based computation.
BackendFinancialJava
0 likes · 6 min read

This article provides an in‑depth tutorial on Java's BigDecimal class—including its overview, constructors, common methods, formatting, exception handling, and utility wrappers—while also containing promotional material for ChatGPT subscription services and related community offers.
ArithmeticJavaTutorial
0 likes · 16 min read

This article explains six typical pitfalls when using Java's BigDecimal for precise calculations—such as initializing with floating‑point literals, neglecting scale in division, misusing equals, confusing scale with precision, ignoring immutability, and performance overhead—and provides clear code‑based solutions to each problem.
ArithmeticBest PracticesJava
0 likes · 7 min read

This article explains six typical pitfalls when using Java's BigDecimal—such as initializing with floating‑point literals, ignoring scale in division, misusing equals, misunderstanding scale, overlooking immutability, and performance costs—and provides clear code examples and best‑practice solutions to prevent precision loss and inefficiency.
ArithmeticJavabigdecimal
0 likes · 7 min read

This article explains how Java's BigDecimal class maintains exact decimal precision by scaling numbers to integers, detailing its class structure, key methods, and a step‑by‑step example that demonstrates the internal addition algorithm.
ArithmeticJavabigdecimal
0 likes · 6 min read

This article explains how Java's BigDecimal class maintains exact decimal precision by scaling numbers to long integers, detailing its internal fields, demonstrating addition with sample code, and analyzing the underlying add method logic to show why no precision is lost.
ArithmeticBackendJava
0 likes · 6 min read

This article explains why Java's BigDecimal maintains exact precision by examining its class fields, demonstrating a test example, and walking through the internal add method logic that scales numbers to long integers before performing arithmetic, ensuring loss‑free results.
ArithmeticBackendJava
0 likes · 6 min read

This article provides an in‑depth introduction to Java's BigDecimal class, covering its purpose for high‑precision arithmetic, frequently used constructors, essential arithmetic and conversion methods, comparison techniques, number‑formatting examples, common exceptions during division, and a utility class that encapsulates typical operations.
ArithmeticJavaUtility
0 likes · 14 min read

The article examines the long‑standing debate over using Long or BigDecimal to represent monetary amounts, presents ten community‑sourced approaches with visual illustrations, analyzes the underlying precision problem, and concludes with a recommendation favoring BigDecimal for accurate financial calculations.
Financial ComputingJavaLong
0 likes · 9 min read

This article explains Java's BigDecimal class, covering its purpose for high‑precision arithmetic, common constructors, essential methods such as add, subtract, multiply, divide, comparison, formatting with NumberFormat, handling of division exceptions, and provides a utility class with static arithmetic operations for accurate calculations.
ArithmeticExceptionFormatting
0 likes · 15 min read

This article introduces Java's BigDecimal class, explains its purpose for high-precision arithmetic beyond double's limits, details constructors, common methods, formatting, comparison, and exception handling, and provides practical code examples and a utility class for accurate mathematical operations.
ArithmeticJavaNumberFormat
0 likes · 15 min read

This article explains the purpose, constructors, common methods, formatting techniques, and exception handling of Java's BigDecimal class, providing code examples and best‑practice recommendations for performing high‑precision calculations in Java applications.
ArithmeticJavabigdecimal
0 likes · 17 min read

This article explains Java's BigDecimal class, covering its purpose for high‑precision arithmetic, recommended constructors, key arithmetic methods, comparison techniques, formatting with NumberFormat, handling of division exceptions, and best‑practice tips such as using the String constructor and managing immutability.
ArithmeticExceptionFormatting
0 likes · 13 min read

Java's BigDecimal class offers arbitrary‑precision decimal arithmetic, requiring method calls like add, subtract, multiply, and divide instead of operators, and should be instantiated via String or valueOf to avoid double‑precision errors, with careful handling of scaling, rounding, formatting, and comparison for exact financial calculations.
ArithmeticJavaNumberFormat
0 likes · 14 min read

This article provides an in‑depth tutorial on Java's BigDecimal class, covering its purpose, common constructors, essential arithmetic methods, comparison techniques, formatting with NumberFormat, handling of division exceptions, and a utility class offering precise add, subtract, multiply, divide, rounding, and comparison operations.
ArithmeticExceptionHandlingFormatting
0 likes · 16 min read

This article explains the Java BigDecimal class, detailing its internal storage mechanisms, precision handling, immutable design, and common pitfalls, and provides best‑practice guidelines for constructing, comparing, dividing, and converting BigDecimal values to ensure accurate numerical computations.
Best PracticesImmutableJava
0 likes · 10 min read

The article explains how Java’s BigDecimal class maintains exact financial precision by storing numbers as an unscaled integer and a scale, scaling operands to a common decimal place, performing integer arithmetic—including handling differing scales—and finally reconstructing a correctly scaled result.
ArithmeticJavabigdecimal
0 likes · 7 min read

This tutorial explains how to compute accuracy, precision, recall, F1‑score, and ROC‑AUC from a confusion matrix using sklearn, TensorFlow, and hand‑crafted Python code, illustrating each metric with example data and visualizations.
F1 scoreROC AUCRecall
0 likes · 13 min read

This article provides an in‑depth overview of Java's BigDecimal class, covering its purpose for high‑precision arithmetic, frequently used constructors, essential methods for arithmetic and conversion, techniques for formatting numbers, handling of common exceptions, and includes practical code examples and a utility class for precise calculations.
ArithmeticFormattingJava
0 likes · 16 min read

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

This article explains why using Java's BigDecimal for monetary values ensures precise, immutable, and correctly rounded calculations, compares it with float, double, long, and int, and provides best‑practice code examples for constructing, computing, and formatting financial numbers.
JavaMonetary Calculationsbigdecimal
0 likes · 8 min read

This article explains why Java's BigDecimal is essential for high‑precision arithmetic, outlines common use cases such as finance and scientific computing, highlights typical pitfalls with floating‑point numbers, and provides practical code examples and best‑practice tips for correct usage.
ArithmeticJavabigdecimal
0 likes · 8 min read

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.
DecimalIEEE754floating-point
0 likes · 9 min read

This article explains Java's BigDecimal class, covering its purpose for high‑precision arithmetic, the most frequently used constructors, essential instance methods, comparison techniques, formatting with NumberFormat, handling of division exceptions, and a utility class that wraps common operations, all illustrated with concrete code examples.
ArithmeticFormattingJava
0 likes · 15 min read

This article provides an in‑depth tutorial on Java's BigDecimal class, covering its purpose for high‑precision arithmetic, common constructors, usage pitfalls, essential methods, number formatting with NumberFormat, handling of division exceptions, and a recommended utility class for precise calculations.
ArithmeticJavaNumberFormat
0 likes · 15 min read

This article explains Java's BigDecimal class for high‑precision arithmetic, covering its purpose, common constructors, usage examples, essential arithmetic and comparison methods, formatting techniques with NumberFormat, handling of division exceptions, and a summary of best practices with a utility class example.
ArithmeticFormattingJava
0 likes · 16 min read

This article explains why using a float to store monetary values leads to precision errors by examining binary representation, demonstrates the problem with a Java example, and recommends using integer or decimal types for accurate financial calculations.
DecimalJavaMoney
0 likes · 7 min read

This article provides a comprehensive guide to Java's BigDecimal class, covering its purpose for high‑precision arithmetic, common constructors, usage pitfalls with double values, essential methods, comparison techniques, formatting options, exception handling, and a utility class for everyday operations.
ArithmeticJavabackend development
0 likes · 19 min read

This article explains Java's BigDecimal class, covering its purpose for high‑precision arithmetic, common constructors, essential methods such as add, subtract, multiply, divide, formatting techniques, handling of non‑terminating decimals, and provides a utility class with examples and best‑practice recommendations for developers.
ArithmeticJavaMathbigdecimal
0 likes · 15 min read

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.
Financial-CalculationsRoundingModebigdecimal
0 likes · 14 min read

This article explains Java's BigDecimal class, covering its constructors, precise arithmetic operations, formatting techniques, common pitfalls with double values, comparison methods, exception handling, and provides a utility class with comprehensive methods for accurate calculations.
ArithmeticExceptionJava
0 likes · 14 min read

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.
ArithmeticJavabigdecimal
0 likes · 8 min read

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.
Best PracticesJavaMath
0 likes · 6 min read

This article explains five common BigDecimal traps—including constructor precision loss, equals vs compareTo, division exceptions, string conversion quirks, and operation order—provides code examples, and recommends using the JSR‑354 Money API with Maven for safer monetary calculations in Java backend development.
BackendJSR 354Java
0 likes · 8 min read

This article explains why floating‑point types cause precision errors in financial calculations, reveals four common BigDecimal pitfalls—including constructor misuse, equality comparison, division precision, and string conversion—and provides concrete best‑practice solutions such as using String constructors, compareTo, specifying scale, and appropriate formatting methods.
Best PracticesFinancialJava
0 likes · 14 min read

JavaScript’s built‑in toFixed cannot reliably perform true rounding due to binary floating‑point precision limits, so this article explains the underlying IEEE‑754 representation, demonstrates common pitfalls, and provides a custom rounding algorithm with code examples to achieve accurate decimal rounding.
IEEE 754Roundingfloating-point
0 likes · 10 min read

This article explains how to evaluate classification models by moving beyond simple accuracy to using confusion matrices, precision, recall, and the F1 score, illustrating their trade‑offs and when each metric is most appropriate for different real‑world scenarios.
ClassificationF1 scoreRecall
0 likes · 4 min read

This article explains why using floating‑point types for monetary calculations can cause precision loss, demonstrates the problem with BigDecimal constructors, analyzes the underlying double‑to‑long conversion, and provides a utility class with safe BigDecimal operations for backend Java applications.
Financial-CalculationsUtilitybigdecimal
0 likes · 9 min read

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.
Financial-CalculationsJavabigdecimal
0 likes · 6 min read

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.
FinancialJavaUtility
0 likes · 8 min read

This article provides a comprehensive guide to Java's BigDecimal class, covering its purpose for high‑precision arithmetic, recommended constructors, essential methods, formatting techniques, handling of non‑terminating division, and a reusable utility class for accurate mathematical operations.
ArithmeticJavaNumberFormatting
0 likes · 16 min read

This article explains why the java.math.BigDecimal(double) constructor can cause precision loss, recommends using the String constructor for monetary values, and advises comparing BigDecimal instances with compareTo instead of equals to avoid scale‑related mismatches.
Best PracticesJavabigdecimal
0 likes · 4 min read

This article explains Java's BigDecimal class, covering its purpose for high‑precision arithmetic, recommended constructors, essential methods, comparison techniques, formatting with NumberFormat, handling of division exceptions, and practical tips for efficient and accurate numeric computations.
ArithmeticExceptionJava
0 likes · 14 min read

This article provides an in‑depth overview of Java's BigDecimal class, covering its purpose for high‑precision arithmetic, essential constructors, key methods for addition, subtraction, multiplication, division, formatting techniques, common exceptions, and practical utility code examples.
ArithmeticExceptionFormatting
0 likes · 15 min read

Geohash encodes latitude‑longitude pairs into short base‑32 strings by recursively bisecting coordinate ranges and interleaving bits, allowing fast proximity queries via prefix matching, with precision controlled by string length, and is supported natively in Redis and useful for location‑based services.
GeoHashPHPSQL
0 likes · 12 min read

This article explains why Java's BigDecimal class is essential for exact arithmetic beyond double's 16‑digit limit, details its constructors, common methods, formatting techniques, handling of division exceptions, and provides a utility class with high‑precision operations, all illustrated with clear code examples.
ArithmeticJavaNumberFormat
0 likes · 15 min read

This article provides a comprehensive summary of machine learning model evaluation metrics, covering accuracy, precision, recall, F1, RMSE, ROC/AUC, KS test, and scoring cards, with explanations, formulas, code examples, and practical considerations for model performance assessment.
AUCKSModel Evaluation
0 likes · 19 min read

This article explains PHP floating-point precision issues, demonstrates common arithmetic errors, and shows how to use the bcmath extension and various rounding functions such as floor, ceil, round, and number_format to achieve accurate numeric calculations in backend development.
BCMathBackendPHP
0 likes · 6 min read

This tutorial walks through a complete workflow for assessing machine‑learning models—using a Kaggle HR attrition dataset, comparing Random Forest and Gradient Boosting via ROC‑AUC, precision, recall and segment analysis with the Evidently library—to decide which model is ready for production deployment.
Model EvaluationROC AUCRecall
0 likes · 17 min read

This guide explains PHP's round() function, detailing its syntax, parameters, rounding modes, and return values, and provides practical code examples that demonstrate how to achieve accurate numeric rounding for various precision and mode settings.
BackendFunctionnumeric
0 likes · 2 min read


DevOpsFeb 20, 2021 · Artificial Intelligence
In this talk, Liang Ning explores how the four "‑ization" of an intelligent closed loop—dynamic data, systematic scenarios, algorithmic business logic, and service delivery—reshape personal fitness, smart commerce, and the broader digital society, illustrating the shift from mere data collection to truly intelligent enterprises.
Data‑DrivenIntelligent LoopNetwork Effect
0 likes · 16 min read

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.
FinancialJavabigdecimal
0 likes · 9 min read

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.
IEEE 754JavaJavaScript
0 likes · 9 min read

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

This article explains why Java's BigDecimal.equals method compares both numeric value and scale, demonstrates common pitfalls with == and equals, shows experimental results for different constructors, and recommends using compareTo for value‑only comparisons to avoid unexpected false outcomes.
JavabigdecimalcompareTo
0 likes · 8 min read


58UXDSep 10, 2020 · Product Management
Using a fruit shop analogy, the article explains recall and precision metrics, illustrates their impact on recruitment search, and presents a matrix of design patterns—including cross‑database search, preset search sets, and matching labels—to boost both recall and accuracy while maintaining user experience.
RecallRecruitmentUser Experience
0 likes · 14 min read

This article explains Java's BigDecimal class, covering its purpose, constructors, common methods, formatting techniques, handling of non‑terminating division, and best‑practice recommendations, while providing clear code examples and practical tips for accurate high‑precision arithmetic.
ArithmeticExceptionHandlingNumberFormat
0 likes · 19 min read

This article explains why adding 0.1 and 0.2 in JavaScript (and most other languages) does not yield exactly 0.3, covering binary representation of decimal fractions, IEEE‑754 precision limits, single‑ and double‑precision formats, and practical implications for developers.
IEEE 754JavaScriptbinary
0 likes · 10 min read

This article explains how floating‑point arithmetic in Java leads to precision loss, shows that even BigDecimal can suffer the same issue when misused, and provides proper construction methods and a utility class to ensure accurate monetary calculations.
BackendJavaUtility
0 likes · 9 min read

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.
JavaMonetary Calculationsbigdecimal
0 likes · 9 min read

The article explains the precision loss caused by using float for monetary values, demonstrates the binary representation of floating‑point numbers, and recommends using integer (cents) or MySQL decimal types to store money accurately, providing Java and SQL examples.
DecimalMoneydatabase
0 likes · 8 min read

JavaScript’s unexpected result for 0.1 + 0.2 versus the exact 0.3 + 0.4 arises because numbers are stored in IEEE‑754 double‑precision binary, where limited mantissa bits require exponent alignment and rounding (ties‑to‑even), causing small representation errors that appear as 0.30000000000000004.
IEEE754Roundingfloating-point
0 likes · 7 min read

This article explains why commercial calculations should use Java's BigDecimal for exact decimal arithmetic, details its structure, shows how to construct instances safely, covers common API methods, rounding modes, number formatting, and provides practical code examples.
APIArithmeticJava
0 likes · 12 min read

This article examines the floating‑point nature of Redis ZSET scores, the precision limits of Java double values, how Redis stores and retrieves these scores, and practical guidelines for avoiding precision loss when using timestamps or large numeric scores in backend development.
SCoReZSetbigdecimal
0 likes · 5 min read

This article explains the purpose and internal representation of Java's BigDecimal, demonstrates various ways to create instances, walks through key parts of its source code, highlights common pitfalls, and provides a utility class for precise arithmetic operations.
BackendJavaUtility
0 likes · 11 min read

After building a binary classification model, this article explains essential evaluation tools such as the confusion matrix, derived metrics like accuracy, precision, recall, F1 score, and the ROC curve, illustrating their definitions, visualizations, and practical considerations for different business scenarios.
Evaluation MetricsF1 scoreROC curve
0 likes · 6 min read

This article explains why JavaScript’s Number type suffers from floating‑point precision errors, describes the IEEE‑754 double‑precision storage format, clarifies key Number properties, shows why 0.1 + 0.2 is not exactly 0.3, and provides practical code‑based solutions.
IEEE 754JavaScriptcode
0 likes · 9 min read

This article explains the principles of Naive Bayes text classification, detailing feature representation, model selection, training and testing procedures, probability calculations, code implementation in Python, and evaluation metrics such as accuracy, precision, recall, PR and ROC curves.
Evaluation MetricsNaive BayesPython
0 likes · 22 min read

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


ITPUBMay 27, 2017 · Fundamentals
The article explains why adding 0.1 and 0.2 in JavaScript, Python or C produces 0.30000000000000004 instead of 0.3, by detailing binary floating‑point representation, IEEE‑754 encoding, exponent alignment, rounding rules, and shows C code that reveals the exact stored bits.
C++IEEE 754JavaScript
0 likes · 11 min read
