ID:146512
 

mob
verb
Addition()
a = input("pick a number") as num
b = input("pick a number") as num
src<<"[a+b]"
Multiplication()
a = input("pick a number") as num
b = input("pick a number") as num
src<<"[a*b]"
Subtraction()
a = input("pick a number") as num
b = input("pick a number") as num
src<<"[a-b]"
Division()
a = input("pick a number") as num
b = input("pick a number") as num
src<<"[a/b]"


var/a,b


Is there a way that when a number is bigger than 65535 without that E thing?
Yeah. The "E" thing is similar to scientific notation, perhaps another form of it. Anyway, when outputting the answer, just use num2text.

By the way, you shouldn't use A and B as variables for public use. Maybe just verb variables, so it reduces bugs when playing with more than one person.

Then you may try and specifiy what you want from each input as well, like listed.
mob/verb
Addition()
var/a=input("Pick a number to add.","Addition")as num
var/b=input("Pick another number to add to the previous.","Addition")as num
src<<"[num2text(a+b)]"
Multiplication()
var/a=input("Choose a number to multiply.","Multiplication")as num
var/b=input("Pick another number to multiply with the previous.","Multiplication")as num
src<<"[num2text(a*b)]"
Subtraction()
var/a=input("Pick a number to be subtracted from.","Subtraction")as num
var/b=input("Pick a number to subtract from the previous.","Subtraction")as num
src<<"[num2text(a-b)]"
Division()
a =input("Pick the number to be divided.","Divison")as num
b =input("Pick the number to divide the previous by.","Division")as num
src<<"[num2text(a/b)]"


Alright, now, let's say you only want to display nine digits before getting into scientific notation. You would use num2text(mathhere,9)
In response to CaptFalcon33035
CaptFalcon33035 wrote:
Yeah. The "E" thing is similar to scientific notation, perhaps another form of it.

E is the exact same thing as scientific notation. I do believe the E stands for "exponential notation", meaning "times ten to the Nth power where N is the number after E". The terms exponential notation and scientific notation mean almost exactly the same thing. The only difference is that scientific notation always multiplies by the base of the number system in use.

1E7 = 1*10**7

All scientific notation is, is cutting off insignificant digits by multiplying the number by base to the number of digits desired.

Many people, even scientists - for whom the notation is named, obviously - say exponential notation instead of scientific notation and mean the same thing.

Sorry, I guess I went on there more than needed. Bottom line, the E means it is in scientific notation, to be multiplied by 10**N.
In response to Loduwijk
how can i complety avoid scientific notaion, how can i have a answer with 30 digits or less or more

other problem
    Power()
var/a =input("What number.","Power")as num
var/b =input("To what power?","Power")as num
src<<"[num2text(a**b)]"

say i put the number 100 and bring it to the 100 why doe's it output 1.#INF
In response to Thedarkavenger
Why don't you try multiplying a hundred times one hundred, a hundred times? See how far you get. It may say that after BYOND wants to stop counting for whatever reason, but I do know that there is a limit to a number before it reaches 1#.INF.
In response to CaptFalcon33035
and how do i get rid of scientific notation so i can have unlimited digits.
In response to Xx Dark Wizard xX
1.#INF means that BYOND has run out of numbers. There is a limit to the amount of numbers you can count with only a handful of bytes. =)

As for getting rid of scientific notation, look up num2text() in the reference. See that optional second argument? Set it to something suitably high, like 1000000.
In response to Crispy
Crispy wrote:
1.#INF means that BYOND has run out of numbers. There is a limit to the amount of numbers you can count with only a handful of bytes. =)

As for getting rid of scientific notation, look up num2text() in the reference. See that optional second argument? Set it to something suitably high, like 1000000.
optional argumnet as in the second argumnet I presume.
num2text(2000000,99)
This means that scientific notation isnt envoked until
after the first 99 numbers.
Hope that helped.
-Intel