1

How can I increase precision of variables by the Coder toolbox generated c source code?

Unfortunately I have a ill-conditioned problem.

3
  • Did you mean ill-conditioned problem?
    – John
    Commented Jun 13, 2012 at 16:51
  • double precision is the standard for all sorts of scientific computing. If your problem is too ill-conditioned for a standard double-precision solver, then you need to fix your problem in the math world before you get to the computer world.
    – Peter
    Commented Jun 13, 2012 at 19:37
  • @Peter: maybe the OP has a numeric problem which is intrinsically hard and cannot resort to rounding because he looks for an exact solution. Happens in formal verification, unfortunately. Commented Jun 14, 2012 at 11:34

1 Answer 1

0

I think that unless you rely on an external library, you cannot work at higher precision than what long double allows. I'm not aware (but I could be wrong) of any ability to interface Coder to the Multiple Precision Toolbox types on native code.

I would suggest to start from the generated C source code and then use an arbitrary precision library such as apfloat. It requires some extra effort on your part, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.