Class: Decimal

lib/break_eternity.Decimal

The Decimal's value is simply mantissa * 10^exponent.

Constructors

constructor

new Decimal(value?)

Parameters

NameType
value?DecimalSource

Defined in

profectus/src/lib/break_eternity.ts:509

Properties

layer

layer: number = Number.NaN

Defined in

profectus/src/lib/break_eternity.ts:507


mag

mag: number = Number.NaN

Defined in

profectus/src/lib/break_eternity.ts:506


sign

sign: number = Number.NaN

Defined in

profectus/src/lib/break_eternity.ts:505


dInf

Static Readonly dInf: Decimal

Defined in

profectus/src/lib/break_eternity.ts:500


dNaN

Static Readonly dNaN: Decimal

Defined in

profectus/src/lib/break_eternity.ts:499


dNegInf

Static Readonly dNegInf: Decimal

Defined in

profectus/src/lib/break_eternity.ts:501


dNegOne

Static Readonly dNegOne: Decimal

Defined in

profectus/src/lib/break_eternity.ts:496


dNumberMax

Static Readonly dNumberMax: Decimal

Defined in

profectus/src/lib/break_eternity.ts:502


dNumberMin

Static Readonly dNumberMin: Decimal

Defined in

profectus/src/lib/break_eternity.ts:503


dOne

Static Readonly dOne: Decimal

Defined in

profectus/src/lib/break_eternity.ts:495


dTen

Static Readonly dTen: Decimal

Defined in

profectus/src/lib/break_eternity.ts:498


dTwo

Static Readonly dTwo: Decimal

Defined in

profectus/src/lib/break_eternity.ts:497


dZero

Static Readonly dZero: Decimal

Defined in

profectus/src/lib/break_eternity.ts:494

Accessors

e

get e(): number

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:558

set e(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

profectus/src/lib/break_eternity.ts:571


exponent

get exponent(): number

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:597

set exponent(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

profectus/src/lib/break_eternity.ts:600


m

get m(): number

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:523

set m(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

profectus/src/lib/break_eternity.ts:545


mantissa

get mantissa(): number

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:589

set mantissa(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

profectus/src/lib/break_eternity.ts:593


s

get s(): number

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:575

set s(value): void

Parameters

NameType
valuenumber

Returns

void

Defined in

profectus/src/lib/break_eternity.ts:578

Methods

abs

abs(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1708


absLog10

absLog10(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2181


acos

acos(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3094


acosh

acosh(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3140


add

add(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1772


ascensionPenalty

ascensionPenalty(ascensions): Decimal

Joke function from Realm Grinder

Parameters

NameType
ascensionsDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3161


asin

asin(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3084


asinh

asinh(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3130


atan

atan(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3104


atanh

atanh(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3150


cbrt

cbrt(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2438


ceil

ceil(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1752


clamp

clamp(min, max): Decimal

Parameters

NameType
minDecimalSource
maxDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2092


clampMax

clampMax(max): Decimal

Parameters

NameType
maxDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2100


clampMin

clampMin(min): Decimal

Parameters

NameType
minDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2096


cmp

cmp(value): CompareResult

-1 for less than value, 0 for equals value, 1 for greater than value

Parameters

NameType
valueDecimalSource

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:1995


cmp_tolerance

cmp_tolerance(value, tolerance): CompareResult

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:2104


cmpabs

cmpabs(value): CompareResult

Parameters

NameType
valueDecimalSource

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:2006


compare

compare(value): CompareResult

Parameters

NameType
valueDecimalSource

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:2025


compare_tolerance

compare_tolerance(value, tolerance): CompareResult

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:2109


cos

cos(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3064


cosh

cosh(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3120


cube

cube(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2434


div

div(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1957


divide

divide(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1962


divideBy

divideBy(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1966


dividedBy

dividedBy(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1970


egg

egg(): Decimal

Joke function from Cookie Clicker. It's 'egg'

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3172


eq

eq(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2037


eq_tolerance

eq_tolerance(value, tolerance): boolean

Tolerance is a relative tolerance, multiplied by the greater of the magnitudes of the two arguments. For example, if you put in 1e-9, then any number closer to the larger number than (larger number)*1e-9 will be considered equal.

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2118


equals

equals(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2044


equals_tolerance

equals_tolerance(value, tolerance): boolean

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2142


exp

exp(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2402


factorial

factorial(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2338


floor

floor(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1742


fromComponents

fromComponents(sign, layer, mag): Decimal

Parameters

NameType
signnumber
layernumber
magnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1305


fromComponents_noNormalize

fromComponents_noNormalize(sign, layer, mag): Decimal

Parameters

NameType
signnumber
layernumber
magnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1314


fromDecimal

fromDecimal(value): Decimal

Parameters

NameType
valueDecimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1337


fromMantissaExponent

fromMantissaExponent(mantissa, exponent): Decimal

Parameters

NameType
mantissanumber
exponentnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1321


fromMantissaExponent_noNormalize

fromMantissaExponent_noNormalize(mantissa, exponent): Decimal

Parameters

NameType
mantissanumber
exponentnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1331


fromNumber

fromNumber(value): Decimal

Parameters

NameType
valuenumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1344


fromString

fromString(value): Decimal

Parameters

NameType
valuestring

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1352


fromValue

fromValue(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1558


gamma

gamma(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2351


greaterThan

greaterThan(other): boolean

Parameters

NameType
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:3188


greaterThanOrEqualTo

greaterThanOrEqualTo(other): boolean

Parameters

NameType
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:3184


gt

gt(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2064


gt_tolerance

gt_tolerance(value, tolerance): boolean

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2164


gte

gte(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2068


gte_tolerance

gte_tolerance(value, tolerance): boolean

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2169


isFinite

isFinite(): boolean

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2033


isNan

isNan(): boolean

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2029


iteratedexp

iteratedexp(height?, payload?): Decimal

Parameters

NameTypeDefault value
heightnumber2
payloadDecimalundefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2566


iteratedlog

iteratedlog(base?, times?): Decimal

Parameters

NameTypeDefault value
baseDecimalSource10
timesnumber1

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2572


lambertw

lambertw(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2810


layeradd

layeradd(diff, base): Decimal

Parameters

NameType
diffnumber
baseDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2793


layeradd10

layeradd10(diff): Decimal

Parameters

NameType
diffDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2726


lessThan

lessThan(other): boolean

Parameters

NameType
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:3180


lessThanOrEqualTo

lessThanOrEqualTo(other): boolean

Parameters

NameType
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:3176


ln

ln(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2232


lngamma

lngamma(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2398


log

log(base): Decimal

Parameters

NameType
baseDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2201


log10

log10(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2191


log2

log2(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2218


logarithm

logarithm(base): Decimal

Parameters

NameType
baseDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2246


lt

lt(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2056


lt_tolerance

lt_tolerance(value, tolerance): boolean

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2154


lte

lte(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2060


lte_tolerance

lte_tolerance(value, tolerance): boolean

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2159


magnitudeWithDecimalPlaces

magnitudeWithDecimalPlaces(places): number

Parameters

NameType
placesnumber

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:1608


mantissaWithDecimalPlaces

mantissaWithDecimalPlaces(places): number

Parameters

NameType
placesnumber

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:1595


max

max(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2072


maxabs

maxabs(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2082


min

min(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2077


minabs

minabs(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2087


minus

minus(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1875


mul

mul(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1879


multiply

multiply(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1949


neg

neg(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1712


negate

negate(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1716


negated

negated(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1720


neq

neq(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2048


neq_tolerance

neq_tolerance(value, tolerance): boolean

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2146


normalize

normalize(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1237


notEquals

notEquals(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2052


notEquals_tolerance

notEquals_tolerance(value, tolerance): boolean

Parameters

NameType
valueDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:2150


pLog10

pLog10(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2174


pentate

pentate(height?, payload?): Decimal

Parameters

NameTypeDefault value
heightnumber2
payloadDecimalSourceundefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3018


plus

plus(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1863


pow

pow(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2250


pow10

pow10(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2289


pow_base

pow_base(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2329


recip

recip(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1974


reciprocal

reciprocal(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1984


reciprocate

reciprocate(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1988


root

root(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2333


round

round(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1732


sgn

sgn(): number

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:1728


sin

sin(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3054


sinh

sinh(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3114


slog

slog(base?): Decimal

Parameters

NameTypeDefault value
baseDecimalSource10

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2614


sqr

sqr(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2417


sqrt

sqrt(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2421


ssqrt

ssqrt(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2832


sub

sub(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1867


subtract

subtract(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1871


tan

tan(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3074


tanh

tanh(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:3126


tetrate

tetrate(height?, payload?): Decimal

Parameters

NameTypeDefault value
heightnumber2
payloadDecimalSourceundefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:2445


times

times(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1953


toExponential

toExponential(places): string

Parameters

NameType
placesnumber

Returns

string

Defined in

profectus/src/lib/break_eternity.ts:1646


toFixed

toFixed(places): string

Parameters

NameType
placesnumber

Returns

string

Defined in

profectus/src/lib/break_eternity.ts:1653


toJSON

toJSON(): string

Returns

string

Defined in

profectus/src/lib/break_eternity.ts:1676


toNumber

toNumber(): number

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:1577


toPrecision

toPrecision(places): string

Parameters

NameType
placesnumber

Returns

string

Defined in

profectus/src/lib/break_eternity.ts:1660


toString

toString(): string

Returns

string

Defined in

profectus/src/lib/break_eternity.ts:1621


toStringWithDecimalPlaces

toStringWithDecimalPlaces(places): string

Parameters

NameType
placesnumber

Returns

string

Defined in

profectus/src/lib/break_eternity.ts:1680


trunc

trunc(): Decimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1762


valueOf

valueOf(): string

Returns

string

Defined in

profectus/src/lib/break_eternity.ts:1672


abs

Static abs(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:640


absLog10

Static absLog10(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:898


add

Static add(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:680


affordArithmeticSeries

Static affordArithmeticSeries(resourcesAvailable, priceStart, priceAdd, currentOwned): Decimal

If you're willing to spend 'resourcesAvailable' and want to buy something with additively increasing cost each purchase (start at priceStart, add by priceAdd, already own currentOwned), how much of it can you buy?

Parameters

NameType
resourcesAvailableDecimalSource
priceStartDecimalSource
priceAddDecimalSource
currentOwnedDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1049


affordArithmeticSeries_core

Static affordArithmeticSeries_core(resourcesAvailable, priceStart, priceAdd, currentOwned): Decimal

Parameters

NameType
resourcesAvailableDecimal
priceStartDecimal
priceAddDecimal
currentOwnedDecimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1155


affordGeometricSeries

Static affordGeometricSeries(resourcesAvailable, priceStart, priceRatio, currentOwned): Decimal

If you're willing to spend 'resourcesAvailable' and want to buy something with exponentially increasing cost each purchase (start at priceStart, multiply by priceRatio, already own currentOwned), how much of it can you buy? Adapted from Trimps source code.

Parameters

NameType
resourcesAvailableDecimalSource
priceStartDecimalSource
priceRatioDecimalSource
currentOwnedDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1017


affordGeometricSeries_core

Static affordGeometricSeries_core(resourcesAvailable, priceStart, priceRatio, currentOwned): Decimal

Parameters

NameType
resourcesAvailableDecimal
priceStartDecimal
priceRatioDecimal
currentOwnedDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1126


cbrt

Static cbrt(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:962


ceil

Static ceil(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:672


clamp

Static clamp(value, min, max): Decimal

Parameters

NameType
valueDecimalSource
minDecimalSource
maxDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:802


clampMax

Static clampMax(value, max): Decimal

Parameters

NameType
valueDecimalSource
maxDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:810


clampMin

Static clampMin(value, min): Decimal

Parameters

NameType
valueDecimalSource
minDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:806


cmp

Static cmp(value, other): CompareResult

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:732


cmp_tolerance

Static cmp_tolerance(value, other, tolerance): CompareResult

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:814


cmpabs

Static cmpabs(value, other): CompareResult

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:736


compare

Static compare(value, other): CompareResult

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:740


compare_tolerance

Static compare_tolerance(value, other, tolerance): CompareResult

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

CompareResult

Defined in

profectus/src/lib/break_eternity.ts:822


critical_section

Static critical_section(base, height, grid): number

Parameters

NameType
basenumber
heightnumber
gridnumber[][]

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:2679


cube

Static cube(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:958


div

Static div(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:712


divide

Static divide(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:716


efficiencyOfPurchase

Static efficiencyOfPurchase(cost, currentRpS, deltaRpS): Decimal

When comparing two purchases that cost (resource) and increase your resource/sec by (deltaRpS), the lowest efficiency score is the better one to purchase. From Frozen Cookies: http://cookieclicker.wikia.com/wiki/Frozen_Cookies_(JavaScript_Add-on)#Efficiency.3F_What.27s_that.3F

Parameters

NameType
costDecimalSource
currentRpSDecimalSource
deltaRpSDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1088


efficiencyOfPurchase_core

Static efficiencyOfPurchase_core(cost, currentRpS, deltaRpS): Decimal

Parameters

NameType
costDecimal
currentRpSDecimal
deltaRpSDecimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1185


eq

Static eq(value, other): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:754


eq_tolerance

Static eq_tolerance(value, other, tolerance): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:830


equals

Static equals(value, other): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:758


equals_tolerance

Static equals_tolerance(value, other, tolerance): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:838


exp

Static exp(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:946


factorial

Static factorial(value, _other?): Decimal

Parameters

NameType
valueDecimalSource
_other?undefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:934


floor

Static floor(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:668


fromComponents

Static fromComponents(sign, layer, mag): Decimal

Parameters

NameType
signnumber
layernumber
magnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:604


fromComponents_noNormalize

Static fromComponents_noNormalize(sign, layer, mag): Decimal

Parameters

NameType
signnumber
layernumber
magnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:608


fromDecimal

Static fromDecimal(value): Decimal

Parameters

NameType
valueDecimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:620


fromMantissaExponent

Static fromMantissaExponent(mantissa, exponent): Decimal

Parameters

NameType
mantissanumber
exponentnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:612


fromMantissaExponent_noNormalize

Static fromMantissaExponent_noNormalize(mantissa, exponent): Decimal

Parameters

NameType
mantissanumber
exponentnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:616


fromNumber

Static fromNumber(value): Decimal

Parameters

NameType
valuenumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:624


fromString

Static fromString(value): Decimal

Parameters

NameType
valuestring

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:628


fromValue

Static fromValue(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:632


fromValue_noAlloc

Static fromValue_noAlloc(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:636


gamma

Static gamma(value, _other?): Decimal

Parameters

NameType
valueDecimalSource
_other?undefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:938


gt

Static gt(value, other): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:778


gt_tolerance

Static gt_tolerance(value, other, tolerance): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:878


gte

Static gte(value, other): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:782


gte_tolerance

Static gte_tolerance(value, other, tolerance): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:886


isFinite

Static isFinite(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:749


isNaN

Static isNaN(value): boolean

Parameters

NameType
valueDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:744


iteratedexp

Static iteratedexp(value, height?, payload?): Decimal

Parameters

NameTypeDefault value
valueDecimalSourceundefined
heightnumber2
payloadDecimalundefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:974


iteratedlog

Static iteratedlog(value, base?, times?): Decimal

Parameters

NameTypeDefault value
valueDecimalSourceundefined
baseDecimalSource10
timesnumber1

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:978


lambertw

Static lambertw(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:994


layeradd

Static layeradd(value, diff, base?): Decimal

Parameters

NameTypeDefault value
valueDecimalSourceundefined
diffnumberundefined
basenumber10

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:986


layeradd10

Static layeradd10(value, diff): Decimal

Parameters

NameType
valueDecimalSource
diffDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:982


ln

Static ln(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:914


lngamma

Static lngamma(value, _other?): Decimal

Parameters

NameType
valueDecimalSource
_other?undefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:942


log

Static log(value, base): Decimal

Parameters

NameType
valueDecimalSource
baseDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:906


log10

Static log10(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:902


log2

Static log2(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:910


logarithm

Static logarithm(value, base): Decimal

Parameters

NameType
valueDecimalSource
baseDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:918


lt

Static lt(value, other): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:770


lt_tolerance

Static lt_tolerance(value, other, tolerance): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:862


lte

Static lte(value, other): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:774


lte_tolerance

Static lte_tolerance(value, other, tolerance): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:870


max

Static max(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:786


maxabs

Static maxabs(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:798


min

Static min(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:790


minabs

Static minabs(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:794


minus

Static minus(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:696


mul

Static mul(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:700


multiply

Static multiply(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:704


neg

Static neg(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:644


negate

Static negate(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:648


negated

Static negated(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:652


neq

Static neq(value, other): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:762


neq_tolerance

Static neq_tolerance(value, other, tolerance): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:846


notEquals

Static notEquals(value, other): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:766


notEquals_tolerance

Static notEquals_tolerance(value, other, tolerance): boolean

Parameters

NameType
valueDecimalSource
otherDecimalSource
tolerancenumber

Returns

boolean

Defined in

profectus/src/lib/break_eternity.ts:854


pLog10

Static pLog10(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:894


pentate

Static pentate(value, height?, payload?): Decimal

Parameters

NameTypeDefault value
valueDecimalSourceundefined
heightnumber2
payloadDecimalSourceundefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1002


plus

Static plus(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:684


pow

Static pow(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:922


pow10

Static pow10(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:926


randomDecimalForTesting

Static randomDecimalForTesting(maxLayers): Decimal

Parameters

NameType
maxLayersnumber

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1096


recip

Static recip(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:720


reciprocal

Static reciprocal(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:724


reciprocate

Static reciprocate(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:728


root

Static root(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:930


round

Static round(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:664


sgn

Static sgn(value): number

Parameters

NameType
valueDecimalSource

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:660


sign

Static sign(value): number

Parameters

NameType
valueDecimalSource

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:656


slog

Static slog(value, base?): Decimal

Parameters

NameTypeDefault value
valueDecimalSourceundefined
basenumber10

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:990


slog_critical

Static slog_critical(base, height): number

Parameters

NameType
basenumber
heightnumber

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:2667


sqr

Static sqr(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:950


sqrt

Static sqrt(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:954


ssqrt

Static ssqrt(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:998


sub

Static sub(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:688


subtract

Static subtract(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:692


sumArithmeticSeries

Static sumArithmeticSeries(numItems, priceStart, priceAdd, currentOwned): Decimal

How much resource would it cost to buy (numItems) items if you already have currentOwned, the initial price is priceStart and it adds priceAdd each purchase? Adapted from http://www.mathwords.com/a/arithmetic_series.htm

Parameters

NameType
numItemsDecimalSource
priceStartDecimalSource
priceAddDecimalSource
currentOwnedDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1068


sumArithmeticSeries_core

Static sumArithmeticSeries_core(numItems, priceStart, priceAdd, currentOwned): Decimal

Parameters

NameType
numItemsDecimal
priceStartDecimal
priceAddDecimal
currentOwnedDecimal

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1174


sumGeometricSeries

Static sumGeometricSeries(numItems, priceStart, priceRatio, currentOwned): Decimal

How much resource would it cost to buy (numItems) items if you already have currentOwned, the initial price is priceStart and it multiplies by priceRatio each purchase?

Parameters

NameType
numItemsDecimalSource
priceStartDecimalSource
priceRatioDecimalSource
currentOwnedDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1035


sumGeometricSeries_core

Static sumGeometricSeries_core(numItems, priceStart, priceRatio, currentOwned): Decimal

Parameters

NameType
numItemsDecimalSource
priceStartDecimal
priceRatioDecimal
currentOwnedDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:1143


tetrate

Static tetrate(value, height?, payload?): Decimal

Parameters

NameTypeDefault value
valueDecimalSourceundefined
heightnumber2
payloadDecimalSourceundefined

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:966


tetrate_critical

Static tetrate_critical(base, height): number

Parameters

NameType
basenumber
heightnumber

Returns

number

Defined in

profectus/src/lib/break_eternity.ts:2675


times

Static times(value, other): Decimal

Parameters

NameType
valueDecimalSource
otherDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:708


trunc

Static trunc(value): Decimal

Parameters

NameType
valueDecimalSource

Returns

Decimal

Defined in

profectus/src/lib/break_eternity.ts:676