You wrote:
> i don't know, if this is a normal behaviour or if it's a bug.
It's not a bug, it's normal behaviour.
The results which you describe show that Powerpro is doing
correct arithmetis. They all make good sense when you consider:
(a) The GetSystemPerformanceData plugin can return a result
which has a decimal place, such as 32.1%
(b) All Powerpro's internal functions and operators do arithmetic
with whole numbers (also called integers) only.
Results of division are simplified to a whole number.
For example 10/3 (which is 3.3333333etc) becomes just 3
Looking at each of your examples:
> If i use *Info expr(GetSystemPerformanceData.Get_CPU_Usage/10)%
> the value is displayed like this 3% (2 digits less)
That looks correct. 32.1 / 10 = 3.21
which Powerpro simplifies to 3
> If i use *Info expr(GetSystemPerformanceData.Get_CPU_Usage/1)%
> then the value is displayed like i want to have it: 32%
That looks correct. 32.1 / 1 = 32.1
which PowerPro simplifies to 32.
By doing some arithmetic (even arithmetic like dividing by 1
which does not really change a value) causes Powerpro
to do its thing of simplifying down to the nearest whole number.
> So division by 10 seems to be treated as division by 100
> and division by 1 seems to be treated as division by 10.
I disagree.
If your first example (dividing by 10) really did divide by 100,
then the result would be 32.1 / 100 which is 0.321, which Powerpro
would simplify to the integer 0
If your second example (dividing by 1) really did divide by 10,
then the result would be 32.1 / 10 which is 3.21, which Powerpro
would simplify to the integer 3
I hope that makes it clear :)
Alan
PS. Powerpro can do more accurate arithmetic, including fractions
(values smaller than integers) which are expressed as decimals,
for example 10 / 4 = 2.25
if you use its float plugin.
Attention: PowerPro's Web site has moved: http://www.ppro.org
SPONSORED LINKS
| Computer monitoring software | Power pro | Computer and internet software |
| Free computer monitoring software |
YAHOO! GROUPS LINKS
- Visit your group "power-pro" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
