Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8241837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:57:52+00:00 2026-06-07T20:57:52+00:00

When rendering in HLSL using SurfaceFormat.Rgba64 I only have a range of [0, 1].

  • 0

When rendering in HLSL using SurfaceFormat.Rgba64 I only have a range of [0, 1]. To work around this I wish to use the entire (not sure of the correct terminology?) range of numbers after the floating point.

I can do this by using two constants to shift the numbers to the left (16BIT_MULTIPLIER) and right (16BIT_INVMULTIPLIER)

16BIT_MULTIPLIER = 1000
16BIT_INVMULTIPLIER = 1 / 16BIT_MULTIPLIER

What is the maximum amount I can shift the numbers to the right and maintain correct precision? In other words what is the maximum value 16BIT_MULTIPLIER can be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:57:54+00:00Added an answer on June 7, 2026 at 8:57 pm

    In a standard 32-bit IEEE 754 floating-point value, the maximum ratio between the most significant bit in a number and its least significant bit is 223. This is because the floating-point encoding has 24 bits (including an “implicit bit”) for the significand (or fraction). So the highest bit may be 223 while the lowest bit is 20 (1), or the highest bit may be 212 while the lowest bit is 2-11, for examples. In your case, you may wish to use a highest bit of 2-1 with a lowest bit of 2-24. You tell us the range you are mapping to ([0, 1]) but not the range you are mapping from, so we cannot tell you the scaling factor to use.

    If you are mapping from unsigned 16-bit numbers, with a range of [0, 65536), you could use a scaling factor of 1/65536. (In many languages, you would write 1./65536 to get a floating-point constant; 1/65536 would be an integer expression that evaluates to zero.) This scaling would map all your numbers into the target range with available precision “below” the numbers, but it would not leave any margin for adding numbers or other operations that increase magnitude. If you want to leave room for more arithmetic while keeping results in the interval [0, 1], then you need a larger ratio (smaller scaling factor).

    You should use powers of two for the scaling factor. Multiplying by powers of two has no rounding error in binary floating point. Multiplying by powers of ten or their inverses (which are necessarily approximate since inverses of powers of ten cannot be exactly represented in binary floating point) usually cause rounding errors.

    In a standard 64-bit IEEE floating-point value, the maximum ratio is 252.

    You ask what the maximum value 16BIT_MULTIPLIER can be, but it is unlikely this is what you actually want. You can make 16BIT_MULTIPLIER as large as you like until the low bits of the numbers reach 2-149. At that point, you reach the end of the exponent range (2-126 for the high bit), and bits with smaller values cannot be represented (in 32-bit floating point).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this nasty rendering issue in IE9 only, IE8 & IE7 works fine
I have a problem rendering the login page. I have followed this turtorial: http://www.dixis.com/?p=352
since they have same rendering engine, this problem shows in both. it works great
I have rendering a section in the bottom master layout. This is typically section
I tried rendering my div images like this horizontally (left-to-right, top-to-bottom). But it's not
The Problem : I am rendering a mesh using HLSL (High Level Shader Language)
I have a rendering intensive game and using png it's too slow to run
For rendering form errors in a twig template, you just have to use the
I am currently developing a Direct3D 11 rendering engine using C#. I have already
When rendering my live wallpaper I have some banding gradient artifacts. This article perfectly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.