This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Double precision maths library

Has anyone any idea where I can get a double precision maths library which will work with the Keil C51 compiler.

Parents
  • The problem here is not just C.

    The float implementation of C51 uses registers for float operations. It can do this because there are eight 1-byte registers and each float only uses 4 bytes. So, C51's implementation is actually pretty fast.

    When you start to implement double operations, you need 8 bytes for each operand and 16 bytes for both. So, you can't do everything in registers. Assuming that you could do everything in registers, I'd expect most operations to be at least 4 times slower. Since you'll have to swap registers out to memory, a factor of 10x is probably not too bad.

    Jon

Reply
  • The problem here is not just C.

    The float implementation of C51 uses registers for float operations. It can do this because there are eight 1-byte registers and each float only uses 4 bytes. So, C51's implementation is actually pretty fast.

    When you start to implement double operations, you need 8 bytes for each operand and 16 bytes for both. So, you can't do everything in registers. Assuming that you could do everything in registers, I'd expect most operations to be at least 4 times slower. Since you'll have to swap registers out to memory, a factor of 10x is probably not too bad.

    Jon

Children