Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Fixed Point Representation Error

Quantize a decimal value to signed fixed point and inspect representational error.

Developer workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaRounded representable value = Math.round(value*2**fraction)/2**fraction; Signed quantization error = Math.round(value*2**fraction)/2**fraction-value; Quantization step = 2**(-fraction)

Made for real tasks

  • Quantize a decimal value to signed fixed point and inspect representational error.
Explore step-by-step workflows →

Worked example

Inputs

Input value
1.2345 number
Integer bits including sign
8 bits
Fractional bits
8 bits

Expected results

Rounded representable value
1.234375 number
Signed quantization error
-0.000125 number
Quantization step
0.00390625 number

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter input value, integer bits including sign, fractional bits in the displayed units.
  2. Calculate the scenario, then compare it with measurements before changing a system.

Try this example

{
  "value": 1.2345,
  "integer": 8,
  "fraction": 8
}

Accuracy and scope

Round-to-nearest with JavaScript tie direction; no saturation or wrapping.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.