Jump to content



Photo
- - - - -

Truncate without rounding?


  • Please log in to reply
1 reply to this topic

#1 UncleDaddySwiss

UncleDaddySwiss

    Newbie

  • Members
  • Pip
  • 1 posts

  • Calculators:
    fx-9750GII

Posted 19 July 2017 - 12:30 AM

Hi, I have a program I'm writing that requires one formula to result in a 4 place decimal to be assigned to a variable, which goes into another formula that requires a 6 place decimal answer. However, in the first formula, the answer needs to be truncated at 4 places without rounding. just chopped off. Is this possible?

Thanks.



#2 (*)

(*)

    Casio Addict

  • Members
  • PipPipPip
  • 51 posts
  • Gender:Not Telling

Posted 19 July 2017 - 07:02 AM

Int(10000n)/10000
Hope that helped :)

Or:

4→D:Int(n*10^D)/10^D→X

D=Amount of decimal places

X=Result


Edited by Emex, 19 July 2017 - 09:16 AM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users