On 5/26/2011 10:08 AM, Jason wrote:
---------- Forwarded Message ---------- Subject: Question about logarithm in MPIR Date: Tuesday 24 May 2011, 22:25:44 From: Aidar Samerkhanov<daryc...@gmail.com> To: thempirt...@gmail.com Hi! Thank you for your great work! MPIR is very good library, I recommend it to my friends and professors in university. Could you tell me can I use logarithm functions in MPIR? Are they exist? Or I should use Taylor series? I want get natural logarithm of 10^20 number.
// Convert the data to mpfr-format mpfr_init (&mpfrRes); mpfr_set_f (&mpfrRes, &mpfArg, MPFR_RNDN); // Let MPFR handle it mpfr_log (&mpfrRes, &mpfrRes, MPFR_RNDN); // Convert the data to mpf-format mpf_init (&mpfRes); mpfr_get_f (&mpfRes, &mpfrRes, MPFR_RNDN); // We no longer need this storage mpfr_clear (&mpfrRes); -- _______________________________________________________________ Bob Smith - bsm...@sudleyplace.com http://www.sudleyplace.com - http://www.nars2000.org -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To post to this group, send email to mpir-devel@googlegroups.com. To unsubscribe from this group, send email to mpir-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en.