Y
Hacker News
new
|
ask
|
show
|
jobs
by
haberman
5276 days ago
Yeah, for large cases the long will overflow (also it will do a lot of realloc()). Your two main options for this are:
1. use double to get approximately-correct answers 2. use an abitrary-precision library like GMP
1 comments
zyzzy
5276 days ago
What if I wanted an exact precision. Could I use a custom data type to get better precision? If I used a custom data type, how could I make the code work for a distributed system to get parallel behavior?
link