All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spire.math.Literals.scala Maven / Gradle / Ivy

The newest version!
package spire.math

import language.experimental.macros
import language.implicitConversions

import scala.{specialized => spec}

import spire.macrosk.Macros

class Literals(s:StringContext) {
  def b():Byte = macro Macros.byte
  def h():Short = macro Macros.short
  def r():Rational = macro Macros.rational
}

class Radix(s:StringContext) {
  def x2():Int = macro Macros.radix
  def x8():Int = macro Macros.radix
  def x10():Int = macro Macros.radix
  def x16():Int = macro Macros.radix
}

class SiLiterals(s:StringContext) {
  def i():Int = macro Macros.siInt
  def j():Long = macro Macros.siLong
  def big():BigInt = macro Macros.siBigInt
  def dec():BigDecimal = macro Macros.siBigDecimal
}

class UsLiterals(s:StringContext) {
  def i():Int = macro Macros.usInt
  def j():Long = macro Macros.usLong
  def big():BigInt = macro Macros.usBigInt
  def dec():BigDecimal = macro Macros.usBigDecimal
}

class EuLiterals(s:StringContext) {
  def i():Int = macro Macros.euInt
  def j():Long = macro Macros.euLong
  def big():BigInt = macro Macros.euBigInt
  def dec():BigDecimal = macro Macros.euBigDecimal
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy