Skip to content

Commit

Permalink
fix: minor add/del changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lbressler13 committed Jan 23, 2024
1 parent 6310d09 commit cd1d04f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ sealed class Term : Number() {
abstract val coefficient: ExactFraction
abstract val factors: List<IrrationalNumber<*>>
abstract val logs: List<Log>
abstract val squareRoots: List<Sqrt>
abstract val pis: List<Pi>
abstract val piCount: Int
abstract val squareRoots: List<Sqrt>

abstract operator fun unaryMinus(): Term
abstract operator fun unaryPlus(): Term
Expand Down
38 changes: 10 additions & 28 deletions signatures/v1.0.0/changes.md → signatures/v1.0.0/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DEL fun checkIsEFString(s: String): Boolean

**CastingOverflowException**
```kotlin
ADD class CastingOverflowException: ArithmeticException
ADD class CastingOverflowException: ArithmeticException()
```

### xyz.lbres.exactnumbers.expressions.term
Expand All @@ -43,9 +43,9 @@ DEL class Term: Number()

ADD val factors: List<IrrationalNumber<*>>
ADD val logs: List<Log>
ADD val squareRoots: List<Sqrt>
ADD val pis: List<Pi>
ADD val piCount: Int
ADD val squareRoots: List<Sqrt>

ADD fun getFactorsByType(irrationalType: String): List<IrrationalNumber<*>>

Expand Down Expand Up @@ -80,20 +80,14 @@ ADD abstract class IrrationalNumber<T : IrrationalNumber<T>>: Comparable<T>, Num
DEL class Log: Comparable<Log>, Irrational
ADD class Log: IrrationalNumber<Log>

ADD Log(argument: BigInteger, isDivided: Boolean)
ADD Log(argument: BigInteger, base: Int, isDivided: Boolean)
ADD Log(argument: ExactFraction, isDivided: Boolean)
ADD Log(argument: ExactFraction, base: Int, isDivided: Boolean)
ADD Log(argument: Int, isDivided: Boolean)
ADD Log(argument: Int, base: Int, isDivided: Boolean)
ADD Log(argument: Long, isDivided: Boolean)
ADD Log(argument: Long, base: Int, isDivided: Boolean)

DEL val isDivided: Boolean
ADD @Deprecated val isDivided: Boolean

DEL fun swapDivided(): Log
ADD @Deprecated fun swapDivided(): Log
DEL Log(argument: BigInteger, isDivided: Boolean)
DEL Log(argument: BigInteger, base: Int, isDivided: Boolean)
DEL Log(argument: ExactFraction, isDivided: Boolean)
DEL Log(argument: ExactFraction, base: Int, isDivided: Boolean)
DEL Log(argument: Int, isDivided: Boolean)
DEL Log(argument: Int, base: Int, isDivided: Boolean)
DEL Log(argument: Long, isDivided: Boolean)
DEL Log(argument: Long, base: Int, isDivided: Boolean)
```

### xyz.lbres.exactnumbers.irrationals.pi
Expand All @@ -106,12 +100,6 @@ ADD class Pi: IrrationalNumber<Pi>()
DEL Pi(isDivided: Boolean): Pi

ADD fun toPlainString(): String

DEL val isDivided: Boolean
ADD @Deprecated val isDivided: Boolean

DEL fun swapDivided(): Pi
ADD @Deprecated fun swapDivided(): Pi
```

### xyz.lbres.exactnumbers.irrationals.pi
Expand All @@ -122,12 +110,6 @@ DEL class Sqrt: Comparable<Sqrt>, Irrational
ADD class Sqrt: IrrationalNumber<Sqrt>

ADD fun toPlainString(): String

DEL val isDivided: Boolean
ADD @Deprecated val isDivided: Boolean

DEL fun swapDivided(): Sqrt
ADD @Deprecated fun swapDivided(): Sqrt
```

### xyz.lbres.expression.term
Expand Down
26 changes: 14 additions & 12 deletions signatures/v1.0.0/v1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fun isEFString(s: String): Boolean

**ExactFractionOverFlowException**
```kotlin
class ExactFractionOverflowException: ArithmeticException
class ExactFractionOverflowException: ArithmeticException()

ExactFractionOverflowException()
ExactFractionOverflowException(message: String)
Expand All @@ -110,13 +110,13 @@ var overflowValue: String?

**CastingOverflowException**
```kotlin
class CastingOverflowException: ArithmeticException

var message: String?
var overflowValue: Any?
class CastingOverflowException: ArithmeticException()

CastingOverflowException()
CastingOverflowException(baseType: String, targetType: String, valueString: String, overflowValue: Any?)

var message: String?
var overflowValue: Any?
```

### xyz.lbres.exactnumbers.expressions.term
Expand All @@ -128,17 +128,17 @@ class Term: Number()
val coefficient: ExactFraction
val factors: List<IrrationalNumber<*>>
val logs: List<Log>
val squareRoots: List<Sqrt>
val pis: List<Pi>
val piCount: Int
val squareRoots: List<Sqrt>

fun getFactorsByType(irrationalType: String): List<IrrationalNumber<*>>
fun getSimplified(): Term
fun getValue(): BigDecimal
fun isZero(): Boolean

operator fun div(): Term
operator fun times(): Term
operator fun div(other: Term): Term
operator fun times(other: Term): Term
operator fun unaryMinus(): Term
operator fun unaryPlus(): Term

Expand All @@ -164,28 +164,30 @@ fun fromValues(coefficient: ExactFraction, logs: List<Log>, roots: List<Sqrt>, p
```kotlin
abstract class IrrationalNumber<T : IrrationalNumber<T>> : Comparable<T>, Number()

val isDivided: Boolean // DEPRECATED
val isInverted: Boolean
val type: String

val isDivided: Boolean // DEPRECATED

fun getRationalValue(): ExactFraction?
fun getValue(): BigDecimal
fun inverse(): T
fun isRational(): Boolean
fun isZero(): Boolean
fun swapDivided(): T // DEPRECATED

operator fun div(other: ExactFraction): Term
operator fun div(other: IrrationalNumber<*>): Term
operator fun times(other: ExactFraction): Term
operator fun times(other: IrrationalNumber<*>): Term

fun swapDivided(): T // DEPRECATED
```

### xyz.lbres.exactnumbers.irrationals.log

**Log**
```kotlin
class Log: IrrationalNumber<Log>
class Log: IrrationalNumber<Log>()

Log(argument: BigInteger): Log
Log(argument: BigInteger, base: Int):
Expand Down Expand Up @@ -233,7 +235,7 @@ val TYPE: String

**Sqrt**
```kotlin
class Sqrt: IrrationalNumber<Sqrt>
class Sqrt: IrrationalNumber<Sqrt>()

Sqrt(radicand: ExactFraction): Sqrt
Sqrt(radicand: BigInteger): Sqrt
Expand Down

0 comments on commit cd1d04f

Please sign in to comment.