another (different) rounding problem

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Re: another (different) rounding problem

Postby ROCLASI » Fri Apr 13, 2018 5:17 pm

:shock: :shock: :shock: :shock:
omg, omg, OMG, OMG!
MUST.....HAVE... ;)
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: another (different) rounding problem

Postby jcompagner » Mon Apr 16, 2018 10:41 am

Code: Select all
function rn(v,p){return Math.round((v+(v<0?-1e-8:1e-8))*Math.pow(10,p))/Math.pow(10,p)}
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: another (different) rounding problem

Postby ROCLASI » Mon Apr 16, 2018 11:42 am

:lol:
What's next? Zip it into a .jar?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: another (different) rounding problem

Postby jcompagner » Tue May 01, 2018 4:37 pm

phh are they adding something related to numbers in javascript:

https://developers.google.com/web/updat ... /05/bigint

isn't it fixing the problem most people have (the rounding of after the decimal point...)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: another (different) rounding problem

Postby Harjo » Sat May 05, 2018 8:11 pm

And when can we expect this in Servoy?
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: another (different) rounding problem

Postby jcompagner » Mon May 07, 2018 10:13 am

only when rhino would implement this
But who here really needs that big int? Who has "rounding" issues with really big integers (not floating points!)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Previous

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 5 guests

cron