BigNumber
Bunnytoes

I am trying to make something like BigInteger and BigDecimal in java, so it can be a large number and have decimals, I have the base of BigInteger rn, but I don't know how I can make it

You are viewing a single comment. View All
Highwayman

what exactly do you mean by "base"? That seems like more than just a base...

Bunnytoes

@Highwayman that in the BigNumber file is the code for biginteger I was hoping to modify it

Highwayman

modify it for decimals? Why don't you make a "BigRatio" instead or something. Seems like that would be easier. @Bunnytoes

Bunnytoes

@Highwayman maybe I could do that, but I don't know how

Highwayman

A ratio/fraction is made up of two integers: a numerator and a denominator, therefore a BigRatio is made up of two BigIntegers(again a numerator and denominator)

remember you rules of addition, subtraction, multiplication, and division of fractions.

implement.

yeah?

@Bunnytoes

Bunnytoes

@Highwayman I know what ratios are, but I don't know how to make a data type

Highwayman

What do you mean? Do you know what a class is? You BigNumber that you just implemented is a class. When you define a class, you are defining a data type.

@Bunnytoes

Bunnytoes

@Highwayman yes I do, but BigInteger is more complex than normal variables

Highwayman

But you've already defined it, have you not? BigRatio does not need to redefine all those things. I am unsure how this applies...

@Bunnytoes