[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Learning C for doing math

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 11
Thread images: 4

File: funny.png (655KB, 766x567px) Image search: [Google]
funny.png
655KB, 766x567px
Sup /g/, /sci/fag here. I am going to try to learn C over the summer in one month. I know python, matlab, and R in the sense that I can use those languages to do scientific computing. A person in my lab knows C very well and I will be able to ask them questions in case I get stuck. What book would you recommend for such an endeavor? So far, my plan was to use google to find a syllabus for a C course and use whatever book they have provided I can find the courses homeworks and solutions, etc.
>>
File: SICP_cover.jpg (51KB, 400x579px) Image search: [Google]
SICP_cover.jpg
51KB, 400x579px
>needing c to do maths
My nigga i gotchu with the better langauge
Its called lisp my nigga.
No need to thank me holmes
>>
>>60542128
>>
>>60542259
C is fast as fuck, it allows certain numerical methods and schemes that would otherwise be too slow to be considered applicable to be used.
>>
C isn't really a math language.
Python is probably the best with Scipy Mathpy and Pandas
R and Julia are okay, but more stat oriented and IMHO Python is better
I don't get the appeal of MATLAB, I think it is disgusting
FORTRAN is King but people say it is old and busted
C++ is also popular with CERN people, and matrices are easier in C++ than C
The biggest issue with C for math IMHO is the fact that there aren't really any super good libraries for math and science. You could be the guy to make them though, and C is really elegant enough to justify it.
You could also learn the dankest meme ever for science: LabView
>>60542287
Also this is all you need to learn C
>>
>>60542324
i'm literally a mathematician, not a scientist. python is my favorite to use right now because it just werks but I know it's not that fast and things I'm doing now that require a lot of fast fourier transforms on images can be sped up by a lot if I switch to a compiled language like C.
>>
File: 1494866124319.png (1MB, 1000x1400px) Image search: [Google]
1494866124319.png
1MB, 1000x1400px
C is the best language for computational physics.
That said start off with k&r and then go with structures and interpretations of computer programming and then to Donald Knuth art of computer programming part 1 2 3.
K&R will make you learn the basis syntax and structure and there is a minefield of bad practices out there.
Also, follow NASA's 10 commandments of C programing, it will force you to make performance grade code.
>>
>>60542453
That's why libraries like NumPy/Scipy actually implement all the heavy number crunching as a wrapper around native C and Fortran libraries.

If you need faster FFTs than the ones included in Scipy, their documentation recommends switching to PyFFTW, which again is a wrapper for the FFTW C library.
https://hgomersall.github.io/pyFFTW/index.html
https://pypi.python.org/pypi/pyFFTW
>>
>>60542128
C++ Primer by Lippman, Lajoie, and Moo
Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers by Gottschling
>>
http://www.maa.org/publications/maa-reviews/c-for-mathematicians-an-introduction-for-students-and-professionals
>>
>>60542128
Learning programming is much easier when you do it in a context you already know.
C++ with the eigen library is probably much more efficient and closer to what you would find in python, matlab and R.
There is also gsl, (gnu scientific library) which works with C and they have a very good document I would suggest you read.
The library is licensed in such a way where if you use want to sell the final application, you must give people the right to run, share edit and contribute to the application or at least not restrict people from doing this.
I would still use it to learn how to program though.
The book is free and does cover a lot of stuff.
Thread posts: 11
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.