Jump to content
  • Advertisement
Sign in to follow this  
devronious

Creating a number type...

This topic is 3620 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there any documentation or guides on how to creat a number type? I want to create a 256bit float and have math functions for it. I think working on the binary level would be good? Thanks for guidance, -Devin

Share this post


Link to post
Share on other sites
Advertisement
I doubt there are. Either way, you would have to design a memory layout which takes maximum advantage of the existing hardware support (look at any assembly language reference manual to check for supported operations).

32-bit and 64-bit floating-point numbers are supported in hardware. While you could support similar operations in software, they will be an order of magnitude slower.

What are your design objectives?

Share this post


Link to post
Share on other sites
There's no way to create a new number type on any architecture that I know. You're best bet will be to create a C++ class, and then overload several operators with functions that perform the arithmetic to make it seem like a primitive type.

Like the last guy said, this will be much slower than using native types.

Share this post


Link to post
Share on other sites
I've been runing calcs and I've found that I am getting significance missing when using doubles. So I'm afraid I must.

-Devin

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!