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.
>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.
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.