NumObject

chisel3.NumObject
trait NumObject

NumObject has a lot of convenience methods for converting between BigInts and Double and BigDecimal

Attributes

Source
Num.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Num

Members list

Value members

Concrete methods

def toBigDecimal(value: BigInt, binaryPoint: Int): BigDecimal

converts a bigInt with the given binaryPoint into the BigDecimal representation

converts a bigInt with the given binaryPoint into the BigDecimal representation

Value parameters

binaryPoint

the implied binaryPoint of @i

value

a bigint

Attributes

Source
Num.scala
def toBigInt(x: Double, binaryPoint: Int): BigInt

How to create a bigint from a double with a specific binaryPoint

How to create a bigint from a double with a specific binaryPoint

Value parameters

binaryPoint

a binaryPoint that you would like to use

x

a double value

Attributes

Source
Num.scala
def toBigInt(x: BigDecimal, binaryPoint: Int): BigInt

Create a bigint from a big decimal with a specific binaryPoint (Int)

Create a bigint from a big decimal with a specific binaryPoint (Int)

Value parameters

binaryPoint

the binaryPoint to use

x

the BigDecimal value

Attributes

Source
Num.scala
def toBigInt(x: BigDecimal, binaryPoint: Int, roundingMode: RoundingMode): BigInt

Create a bigint from a big decimal with a specific binaryPoint (Int)

Create a bigint from a big decimal with a specific binaryPoint (Int)

Value parameters

binaryPoint

the binaryPoint to use

roundingMode

the RoundingMode to use

x

the BigDecimal value

Attributes

Source
Num.scala
def toDouble(i: BigInt, binaryPoint: Int): Double

converts a bigInt with the given binaryPoint into the double representation

converts a bigInt with the given binaryPoint into the double representation

Value parameters

binaryPoint

the implied binaryPoint of @i

i

a bigint

Attributes

Source
Num.scala

Concrete fields

Attributes

Source
Num.scala

Attributes

Source
Num.scala