Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.math/BigDecimal

BigDecimal

scala.math.BigDecimal
See theBigDecimal companion class

Attributes

Companion
class
Source
BigDecimal.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type

Members list

Type members

Classlikes

Attributes

Source
BigDecimal.scala
Supertypes
classObject
traitMatchable
classAny
Self type

Value members

Concrete methods

Constructs aBigDecimal whose value is equal to that of the specifiedInteger value.

Constructs aBigDecimal whose value is equal to that of the specifiedInteger value.

Value parameters

i

the specified integer value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Constructs aBigDecimal whose value is equal to that of the specifiedInteger value, rounding if necessary.

Constructs aBigDecimal whose value is equal to that of the specifiedInteger value, rounding if necessary.

Value parameters

i

the specified integer value

mc

the precision and rounding mode for creation of this value and future operations on it

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Constructs aBigDecimal whose value is equal to that of the specified long value.

Constructs aBigDecimal whose value is equal to that of the specified long value.

Value parameters

l

the specified long value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Constructs aBigDecimal whose value is equal to that of the specified long value, but rounded if necessary.

Constructs aBigDecimal whose value is equal to that of the specified long value, but rounded if necessary.

Value parameters

l

the specified long value

mc

the precision and rounding mode for creation of this value and future operations on it

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala
defapply(unscaledVal:Long,scale:Int):BigDecimal

Constructs aBigDecimal whose unscaled value is equal to that of the specified long value.

Constructs aBigDecimal whose unscaled value is equal to that of the specified long value.

Value parameters

scale

the scale

unscaledVal

the value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala
defapply(unscaledVal:Long,scale:Int,mc:MathContext):BigDecimal

Constructs aBigDecimal whose unscaled value is equal to that of the specified long value, but rounded if necessary.

Constructs aBigDecimal whose unscaled value is equal to that of the specified long value, but rounded if necessary.

Value parameters

mc

the precision and rounding mode for creation of this value and future operations on it

scale

the scale

unscaledVal

the value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Constructs aBigDecimal whose value is equal to that of the specified double value.

Constructs aBigDecimal whose value is equal to that of the specified double value. Equivalent toBigDecimal.decimal.

Value parameters

d

the specifiedDouble value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Constructs aBigDecimal whose value is equal to that of the specified double value, but rounded if necessary.

Constructs aBigDecimal whose value is equal to that of the specified double value, but rounded if necessary. Equivalent toBigDecimal.decimal.

Value parameters

d

the specifiedDouble value

mc

the precision and rounding mode for creation of this value and future operations on it

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Translates a character array representation of aBigDecimal into aBigDecimal.

Translates a character array representation of aBigDecimal into aBigDecimal.

Attributes

Source
BigDecimal.scala

Translates a character array representation of aBigDecimal into aBigDecimal, rounding if necessary.

Translates a character array representation of aBigDecimal into aBigDecimal, rounding if necessary.

Attributes

Source
BigDecimal.scala

Translates the decimal String representation of aBigDecimal into aBigDecimal.

Translates the decimal String representation of aBigDecimal into aBigDecimal.

Attributes

Source
BigDecimal.scala

Translates the decimal String representation of aBigDecimal into aBigDecimal, rounding if necessary.

Translates the decimal String representation of aBigDecimal into aBigDecimal, rounding if necessary.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal whose value is equal to that of the specifiedBigInt value.

Constructs aBigDecimal whose value is equal to that of the specifiedBigInt value.

Value parameters

x

the specifiedBigInt value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Constructs aBigDecimal whose value is equal to that of the specifiedBigInt value, rounding if necessary.

Constructs aBigDecimal whose value is equal to that of the specifiedBigInt value, rounding if necessary.

Value parameters

mc

the precision and rounding mode for creation of this value and future operations on it

x

the specifiedBigInt value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala
defapply(unscaledVal:BigInt,scale:Int):BigDecimal

Constructs aBigDecimal whose unscaled value is equal to that of the specifiedBigInt value.

Constructs aBigDecimal whose unscaled value is equal to that of the specifiedBigInt value.

Value parameters

scale

the scale

unscaledVal

the specifiedBigInt value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala
defapply(unscaledVal:BigInt,scale:Int,mc:MathContext):BigDecimal

Constructs aBigDecimal whose unscaled value is equal to that of the specifiedBigInt value.

Constructs aBigDecimal whose unscaled value is equal to that of the specifiedBigInt value.

Value parameters

mc

the precision and rounding mode for creation of this value and future operations on it

scale

the scale

unscaledVal

the specifiedBigInt value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Constructs aBigDecimal from ajava.math.BigDecimal.

Constructs aBigDecimal from ajava.math.BigDecimal.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal by expanding the binary fraction contained byDouble valued into a decimal representation, rounding if necessary.

Constructs aBigDecimal by expanding the binary fraction contained byDouble valued into a decimal representation, rounding if necessary. When aFloat is converted to aDouble, the binary fraction is preserved, so this method also works for convertedFloats.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal by expanding the binary fraction contained byDouble valued into a decimal representation.

Constructs aBigDecimal by expanding the binary fraction contained byDouble valued into a decimal representation. Note: this also works correctly on convertedFloats.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal using the decimal text representation ofDouble valued, rounding if necessary.

Constructs aBigDecimal using the decimal text representation ofDouble valued, rounding if necessary.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal using the decimal text representation ofDouble valued.

Constructs aBigDecimal using the decimal text representation ofDouble valued.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal using the decimal text representation ofFloat valuef, rounding if necessary.

Constructs aBigDecimal using the decimal text representation ofFloat valuef, rounding if necessary. Note thatBigDecimal.decimal(0.1f) != 0.1f since equality agrees with theDouble representation, and0.1 != 0.1f.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal using the decimal text representation ofFloat valuef.

Constructs aBigDecimal using the decimal text representation ofFloat valuef. Note thatBigDecimal.decimal(0.1f) != 0.1f since equality agrees with theDouble representation, and0.1 != 0.1f.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal from aLong, rounding if necessary.

Constructs aBigDecimal from aLong, rounding if necessary. This is identical toBigDecimal(l, mc).

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal from aLong.

Constructs aBigDecimal from aLong. This is identical toBigDecimal(l).

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal using ajava.math.BigDecimal, rounding if necessary.

Constructs aBigDecimal using ajava.math.BigDecimal, rounding if necessary.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal from ajava.math.BigDecimal.

Constructs aBigDecimal from ajava.math.BigDecimal. The precision is the default forBigDecimal or enough to represent thejava.math.BigDecimal exactly, whichever is greater.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal by fully expanding the binary fraction contained byDouble valued, adjusting the precision as necessary.

Constructs aBigDecimal by fully expanding the binary fraction contained byDouble valued, adjusting the precision as necessary. Note: this works correctly on convertedFloats also.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal that exactly represents aBigInt.

Constructs aBigDecimal that exactly represents aBigInt.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal that exactly represents aLong.

Constructs aBigDecimal that exactly represents aLong. Note that all creation methods forBigDecimal that do not take aMathContext represent aLong; this is equivalent toapply,valueOf, etc..

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal that exactly represents the number specified in aString.

Constructs aBigDecimal that exactly represents the number specified in aString.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal that exactly represents the number specified in base 10 in a character array.

Constructs aBigDecimal that exactly represents the number specified in base 10 in a character array.

Attributes

Source
BigDecimal.scala

Constructs aBigDecimal using the java BigDecimal static valueOf constructor.

Constructs aBigDecimal using the java BigDecimal static valueOf constructor. Equivalent toBigDecimal.decimal.

Value parameters

d

the specified double value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Constructs aBigDecimal using the java BigDecimal static valueOf constructor.

Constructs aBigDecimal using the java BigDecimal static valueOf constructor.

Value parameters

x

the specifiedLong value

Attributes

Returns

the constructedBigDecimal

Source
BigDecimal.scala

Concrete fields

Implicits

Implicits

Implicit conversion fromDouble toBigDecimal.

Implicit conversion fromDouble toBigDecimal.

Attributes

Source
BigDecimal.scala

Implicit conversion fromInt toBigDecimal.

Implicit conversion fromInt toBigDecimal.

Attributes

Source
BigDecimal.scala

Implicit conversion fromjava.math.BigDecimal toscala.BigDecimal.

Implicit conversion fromjava.math.BigDecimal toscala.BigDecimal.

Attributes

Source
BigDecimal.scala

Implicit conversion fromLong toBigDecimal.

Implicit conversion fromLong toBigDecimal.

Attributes

Source
BigDecimal.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp