Python‎ > ‎decimal‎ > ‎

Decimal.log10()


Definition
Return the base ten logarithm of the operand.

Syntax
Decimal(x).log10()

Parameters
x=Decimal value

Examples
The method is equivalent to:
 >>> Decimal(1.1).log10()
Decimal('0.0413926851582
2507581665330045')
>>> Decimal(0).log10()
Decimal('-Infinity')
>>> 


if min(map(lambda(decimal,decimal)).__gt__()
The method returns with the minimum value in the sets equation set1/set2*set2 is greater than 2. 
from decimal import*
set1={Decimal(-1355).adjusted(),Decimal(-233.321).copy_negate(), Decimal(-23.99).exp()}
set2={ Decimal(2.0).fma(3,7),Decimal(1.1).log10()}
if min(map(lambda a,b: a/b*b, set1, set2)).__gt__(2):
        print("Return is greater than 2.")
else:
        print("Not within parameters")

>>> 
Return is greater than 2.
>>>       


int(Decimal)
The method computed the int(value) of the decimal and then run loop through range() function.
from decimal import Decimal

a=int(Decimal(1.1).log10()+Decimal(1.233).logb()- Decimal(1.1).log10()%Decimal(.49).sqrt())

for i in range(a,10):
    print(i)
    print(i/Decimal(1.1).log10())
        
>>>
0
0E+29
1
24.15885792809678504023429545
2
48.31771585619357008046859090
3
72.47657378429035512070288634
4
96.63543171238714016093718179
5
120.7942896404839252011714772
6
144.9531475685807102414057727
7
169.1120054966774952816400681
8
193.2708634247742803218743636
9
217.4297213528710653621086590
>>>



Comments