I am writing a program where I need to parse numbers written in scientific notation (as 0.00812216d0) from a file. It turns out that Julia parse(Type,str) can't parse these numbers because of 'd'.
It works well if I swap 'd' with 'e'. However, it's very unpractical to write replace function everywhere. I can't just do it for the whole text file, as it would cause some unwanted changes. Any solution?
Try (if you want double precision, ie 64 bit floats):
as BallpontBen said in comments. For BigFloat, replace 'Float64' with BigFloat above. If you get errors from your data parsing, consider
which will give you missing for parse errors instead of throwing an error.