Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How do you view the guts of a built-in function?
Replies: 7   Last Post: Jan 17, 2010 11:34 PM

 Messages: [ Previous | Next ]
 GIRAY Posts: 11 Registered: 1/16/10
Re: How do you view the guts of a built-in function?
Posted: Jan 16, 2010 3:04 PM

"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <hismu1\$58d\$1@fred.mathworks.com>...
> Dear Giray!
>

> > I want to see the inside of a built-in function, for example the exp function.
>
> Matlab uses some functions from the FDLIBM, e.g. ACOS, ATAN2, ...
> For EXP this is not stated in the documentation, but the FDLIBM is really a good reference to see how EXP() works:
> http://www.netlib.org/fdlibm/e_exp.c
> As far as I remeber, the FORTRAN version was faster:
> http://www.netlib.org/fn/exp.f
>
> The question is still open: Why want to read the source of EXP?
>
> Kind regards, Jan

it's not necessarily exp() that I want to see. that's just an example, it could be abs(), or sqrt, ect. I remember when I took a numerical computing class in Washington State University, the instructor showed us a code that you could view the guts of a function. it was something like >>view exp()
now that view part is not correct of course but the syntax was something like it. I think that ImageAnalyst's answer is the closest to my expected reply but he's way is the graphic/user interface of doing it. I just remember I wrote a code and saw the function's inside and I had the student edition of Matlab.

Date Subject Author
1/16/10 GIRAY
1/16/10 mike zander
1/16/10 Derek Goring
1/16/10 ImageAnalyst
1/16/10 Jan Simon
1/16/10 GIRAY
1/16/10 mike zander
1/17/10 Steven Lord