MakeMyCalculator.com

CALCULATOR

Negative Input Floor Remainder with Power-of-Two Modulus Calculator

Negative Input Floor Remainder with Power-of-Two Modulus Calculator — change the supplied values to calculate negative input floor remainder with power-of-two modulus.

YOUR INPUTS Live calculation

Input is magnitude0.01..100 of a strictly negative number; listed positive power-of-two modulus1..128 and floor convention for negatives. Zero, positive and tiny-subnormal signed input directions are excluded. Binary scaling avoids decimal quotient ambiguity; no general modulus, arbitrary integer or cryptographic arithmetic claim.

Accepted inputs: Magnitude: 0.01 to 100 number; Modulus: choose 1 (1), 2 (2), 4 (4), 8 (8), 16 (16), 32 (32), 64 (64), 128 (128).

Example values. Enter your own inputs.

Negative Input Floor Remainder with Power-of-Two Modulus

1number

How the calculation works

x=−magnitude; r=x−m floor(x/m)

Choose the floor quotient so its remainder lies between zero and the positive modulus in exact arithmetic.

Worked example

With magnitude 7 number, modulus 4, negative input floor remainder with power-of-two modulus is 1 number.

Assumptions and limits

Input is magnitude0.01..100 of a strictly negative number; listed positive power-of-two modulus1..128 and floor convention for negatives. Zero, positive and tiny-subnormal signed input directions are excluded. Binary scaling avoids decimal quotient ambiguity; no general modulus, arbitrary integer or cryptographic arithmetic claim.

Negative Input Floor Remainder with Power-of-Two Modulus1 number
Edit inputs ↑

Embed this calculator

Paste this snippet into your site. The widget is free and ad-free, opens with your current inputs, and keeps a link back to this calculator.