num

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Released under an MIT license. See LICENSE.

Package num provides oh's rational number type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int

func Int(i int) cell.I

Int creates a num from the integer i.

func Is

func Is(c cell.I) bool

Is returns true if c is a *T.

func New

func New(s string) cell.I

New creates a new num from a string.

func Rat

func Rat(r *big.Rat) cell.I

Rat creates wraps the *big.Rat r as a num.

Types

type T

type T big.Rat

T (num) wraps Go's big.Rat type.

func To

func To(c cell.I) *T

To returns a *T if c is a *T; Otherwise it panics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL