Does decimal math use the FPU?
I would think that the answer is yes, but I’m not sure, since a decimal is not a floating point, but a fixed precision number.
I’m looking mostly for .NET, but a general answer would be useful too.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
With regards to .NET and more specifically C#, no,
System.Decimaldoes not use the FPU because the type is emulated in software.Also,
System.Decimalis a floating point number, not a fixed precision number like commonly found in a database. The type is actually a decimal floating point that uses 10 for its base as opposed to a binary floating point (i.e.System.SingleorSystem.Double) which uses 2 as its base. It still has the same precision problems if you attempt to store a fraction that cannot be exactly represented, for example, 1/3.