Author Topic: RoundTo and CompareValue in 2.0  (Read 2772 times)


  • Full Member
  • ***
  • Posts: 139
Re: RoundTo and CompareValue in 2.0
« Reply #15 on: January 20, 2020, 05:16:48 pm »
Excellent work Jamie and a huge help. 

I've done versions of my current project (industrial process control) in .Net.  In those cases I took the performance hit and used the Decimal type.  That type is given to be a 100 percent accurate representation of value, regardless of the number of post decimal digits.  The downside is that it takes an order of magnitude longer (given 10 or so post decimal digits) for virtually all operations.  None the less, in the target market for that application performance was adequate and accuracy was crucial.  In the current case (the LP app), accuracy is important but precision less so.  Therefore Currency is a good fit.  Your addition here makes it much more practical. 

It would IMO however,  be a sometime-in-the-future great add for LP offer an equivalent of the .Net Decimal type.


  • Hero Member
  • *****
  • Posts: 3774
Re: RoundTo and CompareValue in 2.0
« Reply #16 on: January 21, 2020, 04:18:46 am »
I did some work with an example application..

there is no separate unit but if you want to make one feel free.

This project shows two spin edit inputs you can play with values

I used online examples of Values from Excel.
It has floor, ceiling, RoundTo, Trunc, Int, Mod, CompareValue, RangeComparevalue  and so on..
this is for the Currency type of course..
The only true wisdom is knowing you know nothing


TinyPortal © 2005-2018