Round in functions

Round in functions - Messaggi

#1 Pubblicato: 14/09/2009 23:07:54
Greg Locock

Greg Locock

0 apprezzamenti in 53 post.

Gruppo: 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 Pubblicato: 14/09/2009 23:20:18
Andrey Ivashov

Andrey Ivashov

2.343 apprezzamenti in 4.056 post.

Gruppo: Super Administrator


Seems it's OK. Need an example.
#3 Pubblicato: 14/09/2009 23:32:45
Greg Locock

Greg Locock

0 apprezzamenti in 53 post.

Gruppo: User

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


#4 Pubblicato: 14/09/2009 23:41:00
Andrey Ivashov

Andrey Ivashov

2.343 apprezzamenti in 4.056 post.

Gruppo: 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 Pubblicato: 15/09/2009 00:00:17
Greg Locock

Greg Locock

0 apprezzamenti in 53 post.

Gruppo: User


  • Nuovi post
  • Nessun nuovo post