master (v.1.1.0) vs develop (3/12/2020)
mdehoogh opened this issue · 4 comments
I'm using libtommath to some extent in an interpreter I'm writing, and because the current develop branch was not giving me the error on mp_set_double compilation that master (v.1.1.0) branch was giving me, I was intent on switching over to using develop instead. However, some of the functions I was using have turned into defines (mp_incr, mp_decr, mp_isodd, mp_sqr); mp_n_root was renamed (I guess) to mp_root_n and mp_toradix to mp_to_radix; MP_YES and MP_NO were removed. Using the develop tommath.h was much worse than an adaptation of the old tommath.h, so I switched to using the latter. One problem I encountered was that the type of the size parameter in mp_radix_size changed from int to size_t, causing serious problems when passing in a local int (overwriting a pointer). For now I've added a compiler flag to check whether to use size_t or int but it is a nuisance to have to put that in a C source file:
#ifdef M_MP_DEVELOP
size_t arepsize=0; // MDH@13MAR2020: changing type int to size_t (which is larger), so that we should be able to use it with libtommath-develop
#else
int arepsize=0;
#endif
Furthermore, when I use the develop version my factorial algorithm is say 15% slower with develop than with master. Any idea why?
Kind regards,
Marc P. de Hoogh
The Netherlands
[…]the error on mp_set_double compilation that master (v.1.1.0) branch was giving[…]
What error do you get?
There is a problem with MacOS, see #159 for the details. The actual commit to fix it is in #476
Please be aware that the current version in master
is 1.2.0. I don't know if the fix from #476 gets backported in the near future, we are currently a bit understaffed and overworked here, so it might take a little more time to get 1.2.1 out.
Furthermore, when I use the develop version my factorial algorithm is say 15% slower with develop than with master. Any idea why?
15% is quite significant!
What algorithm? Naive, binary splitting, Borwein, Borwein-Schönberg?
Do you have the implementation public?
(I apologize in advance if you have it in your github repository and I was too blind to find it)
I'm closing this as there was no action for too long.
Please re-open if you have further questions/comments.