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 - 01: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 Emex

Emex

    Casio Fan

  • Members
  • PipPip
  • 33 posts
  • Gender:Not Telling
  • Location:.#[Location]
  • Interests:.#[Interests]

  • Calculators:
    .#[Calculators]

Posted 19 July 2017 - 08: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 - 10:16 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users