Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
math.log versus math.log10
#4
If I understand well the documentation, the result of log(num, 10) is obtained by dividing log(num) by log(10), so there are rounding errors due to the division of two floating numbers at the given precision, and also perhaps to the fact that log(num) has larger magnitude that log10(num). It seems very unlikely that these rounding errors always happen in the same direction and even more unlikely that this is guaranteed by the specifications.
Reply


Messages In This Thread
math.log versus math.log10 - by stevendaprano - May-22-2022, 11:44 AM
RE: math.log versus math.log10 - by jefsummers - May-22-2022, 12:05 PM
RE: math.log versus math.log10 - by stevendaprano - May-23-2022, 01:51 AM
RE: math.log versus math.log10 - by Gribouillis - May-23-2022, 07:19 AM
RE: math.log versus math.log10 - by DeaD_EyE - May-23-2022, 01:04 PM
RE: math.log versus math.log10 - by snippsat - May-23-2022, 02:09 PM
RE: math.log versus math.log10 - by jefsummers - May-23-2022, 02:11 PM
RE: math.log versus math.log10 - by stevendaprano - May-23-2022, 02:35 PM
RE: math.log versus math.log10 - by Gribouillis - May-23-2022, 02:21 PM
RE: math.log versus math.log10 - by Gribouillis - May-23-2022, 08:34 PM
RE: math.log versus math.log10 - by jefsummers - May-23-2022, 08:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  __dict__ in math library akbarza 6 1,197 Sep-28-2023, 08:23 AM
Last Post: buran
  How to do "fixed size" (wrapping) math in Python? AlexanderWulf 13 2,369 Jul-19-2023, 04:13 PM
Last Post: deanhystad
  math problem for experts miltmobley 5 1,290 Jul-09-2023, 07:14 AM
Last Post: Gribouillis
  Math python question Deonvek 6 1,390 Apr-05-2023, 09:27 PM
Last Post: deanhystad
  math formula does not give the same result as bash script [SOLVED] AlphaInc 3 1,095 Apr-02-2023, 07:21 PM
Last Post: AlphaInc
  Determine if keyboard interrupt versus SIGINT trapped? Jibunnokage 5 2,017 Sep-30-2022, 06:54 AM
Last Post: Gribouillis
  Convert SQLite Fetchone() Result to float for Math Extra 13 4,091 Aug-02-2022, 01:12 PM
Last Post: deanhystad
Question Parameterized math calculations? babaliaris 7 17,156 Jun-01-2022, 10:19 AM
Last Post: Gribouillis
  Math Package in python Uma 1 1,611 Dec-12-2021, 02:01 PM
Last Post: jefsummers
  Why getting ValueError : Math domain error in trig. function, math.asin() ? jahuja73 3 4,019 Feb-24-2021, 05:09 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020