# A just out of curiosity question re @DiskTotal

#### mathewsdw

As always, an example:
Code:
``````[Z:\]Echo %@Comma[%@Eval[%@DiskTotal[C:,k]+%@DiskTotal[D:,k]+%@DiskTotal[E:,k]]]
491,514,744

[Z:\]Echo %@Comma[%@Eval[%@DiskTotal[C:,m]+%@DiskTotal[D:,m]+%@DiskTotal[E:,m]]]
491,513``````
The question is, of course, how there can be fewer megabytes than kilobytes, particularly when the the number of kilobytes has the value that it has ...m744]? What am I missing here?

#### samintz

##### Scott Mintz
Most likely it's due to truncation error. Display the individual disk totals, then the sum and see if it's different.
Code:
``````Echo %@DiskTotal[C:,kc] %@DiskTotal[D:,kc] %@DiskTotal[E:,kc]  %@Comma[%@Eval[%@DiskTotal[C:,k]+%@DiskTotal[D:,k]+%@DiskTotal[E:,k]]]
Echo %@DiskTotal[C:,mc] %@DiskTotal[D:,mc] %@DiskTotal[E:,mc]  %@Comma[%@Eval[%@DiskTotal[C:,m]+%@DiskTotal[D:,m]+%@DiskTotal[E:,m]]]``````

#### TEA-Time

Probably because of rounding?

#### mathewsdw

Guys, I found the problem. You see, the function truncates any fractional value so the 321987k becomes 321m and it is the sum of those three what would be fractional megabyte values that goes up to the next megabyte in the kilobyte measurements and those fractional values for megabytes are discarded.

#### Steve Fabian

You want true values - use b. You can adjust the total if desired.

Replies
6
Views
2K
Replies
31
Views
5K
Replies
13
Views
2K
Replies
2
Views
1K
Replies
2
Views
2K
Replies
1
Views
1K
Replies
5
Views
1K
Replies
2
Views
1K
Replies
2
Views
983
Replies
1
Views
1K
Replies
1
Views
2K
Replies
13
Views
527
Replies
9
Views
510
Replies
2
Views
378
Replies
0
Views
503
Replies
3
Views
720
Replies
3
Views
824
Replies
2
Views
953
Documentation Question to %@PSHELL
Replies
4
Views
1K
Replies
6
Views
1K
Replies
17
Views
2K
Replies
0
Views
958
Replies
2
Views
2K
Replies
17
Views
3K
Replies
0
Views
857
Replies
6
Views
2K
Replies
1
Views
998
Replies
1
Views
1K
Replies
6
Views
2K
Replies
4
Views
1K
Replies
10
Views
2K
Replies
5
Views
2K
Replies
0
Views
923
Replies
0
Views
1K
Replies
5
Views
2K
Replies
2
Views
959
Replies
4
Views
1K
Replies
4
Views
1K
Replies
2
Views
1K
Replies
7
Views
2K
Replies
1
Views
938
Replies
10
Views
2K
How to? GLOBAL question
Replies
5
Views
2K
Replies
1
Views
1K
Replies
4
Views
1K
Replies
2
Views
1K
Replies
6
Views
1K
Replies
4
Views
1K
Replies
1
Views
1K
Replies
1
Views
1K