Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Loss of information using small numbers (e-10), MEX, C++
Replies: 7   Last Post: Dec 30, 2013 11:53 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Håkon Seljåsen

Posts: 10
Registered: 12/4/13
Re: Loss of information using small numbers (e-10), MEX, C++
Posted: Dec 30, 2013 9:35 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Phil Goddard" <phil@goddardconsulting.ca> wrote in message <l9qrj7$nmg$1@newscl01ah.mathworks.com>...
> The problem is almost certainly to do with how your compiler handles long doubles.
> Some compilers define long double as the same as double, so you may not be getting what you expect.


That sounds interesting. I use the gcc compiler on MAC OS 10.9.1.
Matlab 2013b.


>
> Also, mxGetPr points to double, so you should be casting to a long double before writing to kappa, betaN etc.


Tried this whitout success.
>
> The problem is not going to be with mxGetField.

Good to know. Realize now that it could not be, since the return value is a pointer, and no data is copied...
>
> Phil.

Thanks for your reply!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.