Fast BigFloat unit for Delphi

孤者浪人 提交于 2019-12-01 06:40:36

问题


I'm looking for a fast BigFloat unit, which can deal with addition, subtraction, multiplication and division (log would be fine but isn't necessary) and which has a precision of at least 100 decimal places. I've tried this unit, but it's about 1,000 times slower than standard extended operations. So, does anyone know a fast(er) BigFloat unit for Delphi?

Henry


回答1:


To summarize the comments to the OP's question.

A C library is probably the best solution for a big floating point library.

GMP claims to be the fastest free library, optimized with assembly and established since 1991.

Use this Delphi wrapper for the GMP library.

For even faster speed with reasonable cost/effort a CUDA/GPU solution would do the job. There are work going on, but I could not find a finalized solution.




回答2:


Software floating point is inherently 1 or 2 orders of magnitude slower than hardware floating point. Couple this with the fact that you are looking for much greater precision and you probably have another order of magnitude.

Your expectations are probably unrealistic.



来源:https://stackoverflow.com/questions/7370657/fast-bigfloat-unit-for-delphi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!