source
stringclasses 1
value | version
stringclasses 1
value | module
stringclasses 43
values | function
stringclasses 307
values | input
stringlengths 3
496
| expected
stringlengths 0
40.5k
| signature
stringclasses 0
values |
|---|---|---|---|---|---|---|
cpython
|
cfcd524
|
_pydecimal
|
Context.compare_total
|
>>> ExtendedContext.compare_total(Decimal('12.3'), Decimal('NaN'))
|
Decimal('-1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.compare_total
|
>>> ExtendedContext.compare_total(1, 2)
|
Decimal('-1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.compare_total
|
>>> ExtendedContext.compare_total(Decimal(1), 2)
|
Decimal('-1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.compare_total
|
>>> ExtendedContext.compare_total(1, Decimal(2))
|
Decimal('-1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_abs
|
>>> ExtendedContext.copy_abs(Decimal('2.1'))
|
Decimal('2.1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_abs
|
>>> ExtendedContext.copy_abs(Decimal('-100'))
|
Decimal('100')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_abs
|
>>> ExtendedContext.copy_abs(-1)
|
Decimal('1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_decimal
|
>>> ExtendedContext.copy_decimal(Decimal('2.1'))
|
Decimal('2.1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_decimal
|
>>> ExtendedContext.copy_decimal(Decimal('-1.00'))
|
Decimal('-1.00')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_decimal
|
>>> ExtendedContext.copy_decimal(1)
|
Decimal('1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_negate
|
>>> ExtendedContext.copy_negate(Decimal('101.5'))
|
Decimal('-101.5')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_negate
|
>>> ExtendedContext.copy_negate(Decimal('-101.5'))
|
Decimal('101.5')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_negate
|
>>> ExtendedContext.copy_negate(1)
|
Decimal('-1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_sign
|
>>> ExtendedContext.copy_sign(Decimal( '1.50'), Decimal('7.33'))
|
Decimal('1.50')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_sign
|
>>> ExtendedContext.copy_sign(Decimal('-1.50'), Decimal('7.33'))
|
Decimal('1.50')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_sign
|
>>> ExtendedContext.copy_sign(Decimal( '1.50'), Decimal('-7.33'))
|
Decimal('-1.50')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_sign
|
>>> ExtendedContext.copy_sign(Decimal('-1.50'), Decimal('-7.33'))
|
Decimal('-1.50')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_sign
|
>>> ExtendedContext.copy_sign(1, -2)
|
Decimal('-1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_sign
|
>>> ExtendedContext.copy_sign(Decimal(1), -2)
|
Decimal('-1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.copy_sign
|
>>> ExtendedContext.copy_sign(1, Decimal(-2))
|
Decimal('-1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('1'), Decimal('3'))
|
Decimal('0.333333333')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('2'), Decimal('3'))
|
Decimal('0.666666667')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('5'), Decimal('2'))
|
Decimal('2.5')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('1'), Decimal('10'))
|
Decimal('0.1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('12'), Decimal('12'))
|
Decimal('1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('8.00'), Decimal('2'))
|
Decimal('4.00')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('2.400'), Decimal('2.0'))
|
Decimal('1.20')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('1000'), Decimal('100'))
|
Decimal('10')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('1000'), Decimal('1'))
|
Decimal('1000')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal('2.40E+6'), Decimal('2'))
|
Decimal('1.20E+6')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(5, 5)
|
Decimal('1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(Decimal(5), 5)
|
Decimal('1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide
|
>>> ExtendedContext.divide(5, Decimal(5))
|
Decimal('1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide_int
|
>>> ExtendedContext.divide_int(Decimal('2'), Decimal('3'))
|
Decimal('0')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide_int
|
>>> ExtendedContext.divide_int(Decimal('10'), Decimal('3'))
|
Decimal('3')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide_int
|
>>> ExtendedContext.divide_int(Decimal('1'), Decimal('0.3'))
|
Decimal('3')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide_int
|
>>> ExtendedContext.divide_int(10, 3)
|
Decimal('3')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide_int
|
>>> ExtendedContext.divide_int(Decimal(10), 3)
|
Decimal('3')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divide_int
|
>>> ExtendedContext.divide_int(10, Decimal(3))
|
Decimal('3')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divmod
|
>>> ExtendedContext.divmod(Decimal(8), Decimal(3))
|
(Decimal('2'), Decimal('2'))
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divmod
|
>>> ExtendedContext.divmod(Decimal(8), Decimal(4))
|
(Decimal('2'), Decimal('0'))
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divmod
|
>>> ExtendedContext.divmod(8, 4)
|
(Decimal('2'), Decimal('0'))
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divmod
|
>>> ExtendedContext.divmod(Decimal(8), 4)
|
(Decimal('2'), Decimal('0'))
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.divmod
|
>>> ExtendedContext.divmod(8, Decimal(4))
|
(Decimal('2'), Decimal('0'))
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c = ExtendedContext.copy()
| null |
|
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.Emin = -999
| null |
|
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.Emax = 999
| null |
|
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.exp(Decimal('-Infinity'))
|
Decimal('0')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.exp(Decimal('-1'))
|
Decimal('0.367879441')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.exp(Decimal('0'))
|
Decimal('1')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.exp(Decimal('1'))
|
Decimal('2.71828183')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.exp(Decimal('0.693147181'))
|
Decimal('2.00000000')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.exp(Decimal('+Infinity'))
|
Decimal('Infinity')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.exp
|
>>> c.exp(10)
|
Decimal('22026.4658')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.fma
|
>>> ExtendedContext.fma(Decimal('3'), Decimal('5'), Decimal('7'))
|
Decimal('22')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.fma
|
>>> ExtendedContext.fma(Decimal('3'), Decimal('-5'), Decimal('7'))
|
Decimal('-8')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.fma
|
>>> ExtendedContext.fma(Decimal('888565290'), Decimal('1557.96930'), Decimal('-86087.7578'))
|
Decimal('1.38435736E+12')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.fma
|
>>> ExtendedContext.fma(1, 3, 4)
|
Decimal('7')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.fma
|
>>> ExtendedContext.fma(1, Decimal(3), 4)
|
Decimal('7')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.fma
|
>>> ExtendedContext.fma(1, 3, Decimal(4))
|
Decimal('7')
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_canonical
|
>>> ExtendedContext.is_canonical(Decimal('2.50'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_finite
|
>>> ExtendedContext.is_finite(Decimal('2.50'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_finite
|
>>> ExtendedContext.is_finite(Decimal('-0.3'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_finite
|
>>> ExtendedContext.is_finite(Decimal('0'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_finite
|
>>> ExtendedContext.is_finite(Decimal('Inf'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_finite
|
>>> ExtendedContext.is_finite(Decimal('NaN'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_finite
|
>>> ExtendedContext.is_finite(1)
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_infinite
|
>>> ExtendedContext.is_infinite(Decimal('2.50'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_infinite
|
>>> ExtendedContext.is_infinite(Decimal('-Inf'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_infinite
|
>>> ExtendedContext.is_infinite(Decimal('NaN'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_infinite
|
>>> ExtendedContext.is_infinite(1)
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_nan
|
>>> ExtendedContext.is_nan(Decimal('2.50'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_nan
|
>>> ExtendedContext.is_nan(Decimal('NaN'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_nan
|
>>> ExtendedContext.is_nan(Decimal('-sNaN'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_nan
|
>>> ExtendedContext.is_nan(1)
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c = ExtendedContext.copy()
| null |
|
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c.Emin = -999
| null |
|
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c.Emax = 999
| null |
|
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c.is_normal(Decimal('2.50'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c.is_normal(Decimal('0.1E-999'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c.is_normal(Decimal('0.00'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c.is_normal(Decimal('-Inf'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c.is_normal(Decimal('NaN'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_normal
|
>>> c.is_normal(1)
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_qnan
|
>>> ExtendedContext.is_qnan(Decimal('2.50'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_qnan
|
>>> ExtendedContext.is_qnan(Decimal('NaN'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_qnan
|
>>> ExtendedContext.is_qnan(Decimal('sNaN'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_qnan
|
>>> ExtendedContext.is_qnan(1)
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_signed
|
>>> ExtendedContext.is_signed(Decimal('2.50'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_signed
|
>>> ExtendedContext.is_signed(Decimal('-12'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_signed
|
>>> ExtendedContext.is_signed(Decimal('-0'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_signed
|
>>> ExtendedContext.is_signed(8)
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_signed
|
>>> ExtendedContext.is_signed(-8)
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_snan
|
>>> ExtendedContext.is_snan(Decimal('2.50'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_snan
|
>>> ExtendedContext.is_snan(Decimal('NaN'))
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_snan
|
>>> ExtendedContext.is_snan(Decimal('sNaN'))
|
True
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_snan
|
>>> ExtendedContext.is_snan(1)
|
False
| null |
cpython
|
cfcd524
|
_pydecimal
|
Context.is_subnormal
|
>>> c = ExtendedContext.copy()
| null |
|
cpython
|
cfcd524
|
_pydecimal
|
Context.is_subnormal
|
>>> c.Emin = -999
| null |
|
cpython
|
cfcd524
|
_pydecimal
|
Context.is_subnormal
|
>>> c.Emax = 999
| null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.