numeric-precision-units

Enforce numeric precision and unit consistency with stable arithmetic algorithms.

9|3|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill numeric-precision-units
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: numeric-precision-units
Source: https://github.com/Sir-chawakorn/sanook-cli/tree/main/skills/numeric-precision-units
Command: npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill numeric-precision-units

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents silent data corruption and logic errors caused by floating-point inaccuracies, integer overflows, and inconsistent unit conversions in scientific or high-precision applications.

Core Features & Use Cases

  • Precision Guardrails: Implements robust float comparison using relative and absolute tolerances to replace unreliable equality checks.
  • Stable Accumulation: Provides Kahan and Welford algorithms to prevent catastrophic cancellation and rounding errors in large datasets.
  • Boundary Safety: Ensures safe cross-boundary data transport for int64 and decimal types to prevent precision loss in JSON, JS, and database layers.

Quick Start

Use the numeric-precision-units skill to audit my current codebase for unsafe floating-point comparisons and suggest robust replacements.

Frequently Asked Questions about numeric-precision-units

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent floating-point precision errors in financial data processing?

Audit code for unsafe floating-point comparisons and suggest robust replacements. This skill analyzes your codebase to identify precision vulnerabilities and recommends stable arithmetic algorithms to fix them.

What is the best way to handle large dataset accumulation without rounding errors?

The best way to handle large dataset accumulation without rounding errors is to implement stable algorithms like Kahan summation and Welford's method. These prevent catastrophic cancellation and maintain accuracy in high-precision applications.

How do I prevent precision loss when transporting int64 and decimal types across JSON and JavaScript?

Prevent precision loss during cross-boundary data transport by applying strict boundary validation for int64 and decimal types. This ensures safe data transport across JSON, JavaScript, and database layers without corruption.

Does this approach support IEEE 754 compliance and integer overflow detection for scientific computing?

Yes, this approach supports IEEE 754 compliance and integer overflow detection by enforcing strict numeric precision and unit consistency. It applies stable arithmetic algorithms and boundary validation to prevent critical precision loss.

How do I audit my codebase for unsafe floating-point comparisons?

Audit your codebase for unsafe floating-point comparisons by scanning for direct equality checks on floats and replacing them with robust relative and absolute tolerance comparisons. This prevents silent data corruption and logic errors.

When do I need unit-typed conversion safety in cross-language system integrations?

You need unit-typed conversion safety in cross-language system integrations when transferring data between systems with different numeric representations. Strict boundary validation prevents precision loss and ensures consistent unit conversions across language boundaries.