Round in functions

Round in functions - Messages

#1 Posted: 9/14/2009 11:07:54 PM
Greg Locock

Greg Locock

0 likes in 53 posts.

Group: User

I'm trying to use round(x,0) in a function to fix a floating point number, so that I can use it as an index in a matrix.

However, when I try to do this it doesn't work, and the yellow box shows that all instances of round have been reinterpreted as mod.


#2 Posted: 9/14/2009 11:20:18 PM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: Super Administrator


Seems it's OK. Need an example.
#3 Posted: 9/14/2009 11:32:45 PM
Greg Locock

Greg Locock

0 likes in 53 posts.

Group: User

dn(day,month,year)←round((0+({month-1}/12)+year-1900)*365.25+day,0)
dn(15,9,2009)=


#4 Posted: 9/14/2009 11:41:00 PM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: Super Administrator

My fault, sorry.
Error fixed.
[MATH lang=eng]dn(day,month,year)←round((0+({month-1}/12)+year-1900)*365.25+day,0)[/MATH]
[MATH lang=eng]dn(15,9,2009)=40071[/MATH]

What version you need to have (Desktop/Linux/Handheld)? If you need in Desktop one, then here is new builds for you:
SMathStudioDesktop.0_85_3545.Setup.msi
SMathStudioDesktop.0_85_3545.Portable.exe
#5 Posted: 9/15/2009 12:00:17 AM
Greg Locock

Greg Locock

0 likes in 53 posts.

Group: User


  • New Posts New Posts
  • No New Posts No New Posts