source stringclasses 2 values | version stringclasses 2 values | module stringclasses 53 values | function stringclasses 318 values | input stringlengths 3 496 | expected stringlengths 0 876 | signature stringclasses 41 values |
|---|---|---|---|---|---|---|
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+1')) | Decimal('0E+1') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('-Inf'), Decimal('Infinity')) | Decimal('-Infinity') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('2'), Decimal('Infinity')) | Decimal('NaN') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('-0.1'), Decimal('1')) | Decimal('-0') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('-0'), Decimal('1e+5')) | Decimal('-0E+5') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('+35236450.6'), Decimal('1e-2')) | Decimal('NaN') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('-35236450.6'), Decimal('1e-2')) | Decimal('NaN') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-1')) | Decimal('217.0') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-0')) | Decimal('217') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+1')) | Decimal('2.2E+2') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+2')) | Decimal('2E+2') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(1, 2) | Decimal('1') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(Decimal(1), 2) | Decimal('1') | null |
cpython | 3.10 | _pydecimal | Context.quantize | >>> ExtendedContext.quantize(1, Decimal(2)) | Decimal('1') | null |
cpython | 3.10 | _pydecimal | Context.radix | >>> ExtendedContext.radix() | Decimal('10') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(Decimal('2.1'), Decimal('3')) | Decimal('2.1') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(Decimal('10'), Decimal('3')) | Decimal('1') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(Decimal('-10'), Decimal('3')) | Decimal('-1') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(Decimal('10.2'), Decimal('1')) | Decimal('0.2') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(Decimal('10'), Decimal('0.3')) | Decimal('0.1') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(Decimal('3.6'), Decimal('1.3')) | Decimal('1.0') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(22, 6) | Decimal('4') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(Decimal(22), 6) | Decimal('4') | null |
cpython | 3.10 | _pydecimal | Context.remainder | >>> ExtendedContext.remainder(22, Decimal(6)) | Decimal('4') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(Decimal('2.1'), Decimal('3')) | Decimal('-0.9') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('6')) | Decimal('-2') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('3')) | Decimal('1') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(Decimal('-10'), Decimal('3')) | Decimal('-1') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(Decimal('10.2'), Decimal('1')) | Decimal('0.2') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('0.3')) | Decimal('0.1') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(Decimal('3.6'), Decimal('1.3')) | Decimal('-0.3') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(3, 11) | Decimal('3') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(Decimal(3), 11) | Decimal('3') | null |
cpython | 3.10 | _pydecimal | Context.remainder_near | >>> ExtendedContext.remainder_near(3, Decimal(11)) | Decimal('3') | null |
cpython | 3.10 | _pydecimal | Context.rotate | >>> ExtendedContext.rotate(Decimal('34'), Decimal('8')) | Decimal('400000003') | null |
cpython | 3.10 | _pydecimal | Context.rotate | >>> ExtendedContext.rotate(Decimal('12'), Decimal('9')) | Decimal('12') | null |
cpython | 3.10 | _pydecimal | Context.rotate | >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('-2')) | Decimal('891234567') | null |
cpython | 3.10 | _pydecimal | Context.rotate | >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('0')) | Decimal('123456789') | null |
cpython | 3.10 | _pydecimal | Context.rotate | >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('+2')) | Decimal('345678912') | null |
cpython | 3.10 | _pydecimal | Context.rotate | >>> ExtendedContext.rotate(1333333, 1) | Decimal('13333330') | null |
cpython | 3.10 | _pydecimal | Context.rotate | >>> ExtendedContext.rotate(Decimal(1333333), 1) | Decimal('13333330') | null |
cpython | 3.10 | _pydecimal | Context.rotate | >>> ExtendedContext.rotate(1333333, Decimal(1)) | Decimal('13333330') | null |
cpython | 3.10 | _pydecimal | Context.same_quantum | >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.001')) | False | null |
cpython | 3.10 | _pydecimal | Context.same_quantum | >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.01')) | True | null |
cpython | 3.10 | _pydecimal | Context.same_quantum | >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('1')) | False | null |
cpython | 3.10 | _pydecimal | Context.same_quantum | >>> ExtendedContext.same_quantum(Decimal('Inf'), Decimal('-Inf')) | True | null |
cpython | 3.10 | _pydecimal | Context.same_quantum | >>> ExtendedContext.same_quantum(10000, -1) | True | null |
cpython | 3.10 | _pydecimal | Context.same_quantum | >>> ExtendedContext.same_quantum(Decimal(10000), -1) | True | null |
cpython | 3.10 | _pydecimal | Context.same_quantum | >>> ExtendedContext.same_quantum(10000, Decimal(-1)) | True | null |
cpython | 3.10 | _pydecimal | Context.scaleb | >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('-2')) | Decimal('0.0750') | null |
cpython | 3.10 | _pydecimal | Context.scaleb | >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('0')) | Decimal('7.50') | null |
cpython | 3.10 | _pydecimal | Context.scaleb | >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('3')) | Decimal('7.50E+3') | null |
cpython | 3.10 | _pydecimal | Context.scaleb | >>> ExtendedContext.scaleb(1, 4) | Decimal('1E+4') | null |
cpython | 3.10 | _pydecimal | Context.scaleb | >>> ExtendedContext.scaleb(Decimal(1), 4) | Decimal('1E+4') | null |
cpython | 3.10 | _pydecimal | Context.scaleb | >>> ExtendedContext.scaleb(1, Decimal(4)) | Decimal('1E+4') | null |
cpython | 3.10 | _pydecimal | Context.shift | >>> ExtendedContext.shift(Decimal('34'), Decimal('8')) | Decimal('400000000') | null |
cpython | 3.10 | _pydecimal | Context.shift | >>> ExtendedContext.shift(Decimal('12'), Decimal('9')) | Decimal('0') | null |
cpython | 3.10 | _pydecimal | Context.shift | >>> ExtendedContext.shift(Decimal('123456789'), Decimal('-2')) | Decimal('1234567') | null |
cpython | 3.10 | _pydecimal | Context.shift | >>> ExtendedContext.shift(Decimal('123456789'), Decimal('0')) | Decimal('123456789') | null |
cpython | 3.10 | _pydecimal | Context.shift | >>> ExtendedContext.shift(Decimal('123456789'), Decimal('+2')) | Decimal('345678900') | null |
cpython | 3.10 | _pydecimal | Context.shift | >>> ExtendedContext.shift(88888888, 2) | Decimal('888888800') | null |
cpython | 3.10 | _pydecimal | Context.shift | >>> ExtendedContext.shift(Decimal(88888888), 2) | Decimal('888888800') | null |
cpython | 3.10 | _pydecimal | Context.shift | >>> ExtendedContext.shift(88888888, Decimal(2)) | Decimal('888888800') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('0')) | Decimal('0') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('-0')) | Decimal('-0') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('0.39')) | Decimal('0.624499800') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('100')) | Decimal('10') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('1')) | Decimal('1') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('1.0')) | Decimal('1.0') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('1.00')) | Decimal('1.0') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('7')) | Decimal('2.64575131') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(Decimal('10')) | Decimal('3.16227766') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.sqrt(2) | Decimal('1.41421356') | null |
cpython | 3.10 | _pydecimal | Context.sqrt | >>> ExtendedContext.prec | 9 | null |
cpython | 3.10 | _pydecimal | Context.subtract | >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.07')) | Decimal('0.23') | null |
cpython | 3.10 | _pydecimal | Context.subtract | >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.30')) | Decimal('0.00') | null |
cpython | 3.10 | _pydecimal | Context.subtract | >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('2.07')) | Decimal('-0.77') | null |
cpython | 3.10 | _pydecimal | Context.subtract | >>> ExtendedContext.subtract(8, 5) | Decimal('3') | null |
cpython | 3.10 | _pydecimal | Context.subtract | >>> ExtendedContext.subtract(Decimal(8), 5) | Decimal('3') | null |
cpython | 3.10 | _pydecimal | Context.subtract | >>> ExtendedContext.subtract(8, Decimal(5)) | Decimal('3') | null |
cpython | 3.10 | _pydecimal | Context.to_eng_string | >>> ExtendedContext.to_eng_string(Decimal('123E+1')) | '1.23E+3' | null |
cpython | 3.10 | _pydecimal | Context.to_eng_string | >>> ExtendedContext.to_eng_string(Decimal('123E+3')) | '123E+3' | null |
cpython | 3.10 | _pydecimal | Context.to_eng_string | >>> ExtendedContext.to_eng_string(Decimal('123E-10')) | '12.3E-9' | null |
cpython | 3.10 | _pydecimal | Context.to_eng_string | >>> ExtendedContext.to_eng_string(Decimal('-123E-12')) | '-123E-12' | null |
cpython | 3.10 | _pydecimal | Context.to_eng_string | >>> ExtendedContext.to_eng_string(Decimal('7E-7')) | '700E-9' | null |
cpython | 3.10 | _pydecimal | Context.to_eng_string | >>> ExtendedContext.to_eng_string(Decimal('7E+1')) | '70' | null |
cpython | 3.10 | _pydecimal | Context.to_eng_string | >>> ExtendedContext.to_eng_string(Decimal('0E+1')) | '0.00E+3' | null |
cpython | 3.10 | _pydecimal | Context.to_integral_exact | >>> ExtendedContext.to_integral_exact(Decimal('2.1')) | Decimal('2') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_exact | >>> ExtendedContext.to_integral_exact(Decimal('100')) | Decimal('100') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_exact | >>> ExtendedContext.to_integral_exact(Decimal('100.0')) | Decimal('100') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_exact | >>> ExtendedContext.to_integral_exact(Decimal('101.5')) | Decimal('102') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_exact | >>> ExtendedContext.to_integral_exact(Decimal('-101.5')) | Decimal('-102') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_exact | >>> ExtendedContext.to_integral_exact(Decimal('10E+5')) | Decimal('1.0E+6') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_exact | >>> ExtendedContext.to_integral_exact(Decimal('7.89E+77')) | Decimal('7.89E+77') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_exact | >>> ExtendedContext.to_integral_exact(Decimal('-Inf')) | Decimal('-Infinity') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_value | >>> ExtendedContext.to_integral_value(Decimal('2.1')) | Decimal('2') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_value | >>> ExtendedContext.to_integral_value(Decimal('100')) | Decimal('100') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_value | >>> ExtendedContext.to_integral_value(Decimal('100.0')) | Decimal('100') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_value | >>> ExtendedContext.to_integral_value(Decimal('101.5')) | Decimal('102') | null |
cpython | 3.10 | _pydecimal | Context.to_integral_value | >>> ExtendedContext.to_integral_value(Decimal('-101.5')) | Decimal('-102') | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.