Jump to content



Photo
- - - - -

Mod Function ( A Mod B) How To


  • Please log in to reply
1 reply to this topic

#1 adrios

adrios

    Newbie

  • Members
  • Pip
  • 1 posts

  • Calculators:
    fx 7400g

Posted 01 September 2012 - 02:25 PM

Hi!
I' m new here :)

I' m casio fx-7400G owner, and was wondering about creating a program to do "a mod b" in a easy way, instead of using the subtraction one.

is it a common a question?
can you help me?

hope this is the right section, thank you

#2 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 25 September 2012 - 02:03 PM

Welcome to UCF, adrios! Introduce yourself here.

What do you want to do? a mod b can be calculated by b * (a/b - int(a/b)). ("int" is the integer part function)
So there is no need to subtractions.

I may not have understood you correctly. Please explain more?


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users