Re: Procedure for percent of a value
- From: Andreas Leitgeb <avl@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 29 Feb 2008 15:23:21 GMT
Marcos Martinez Sancho <noemail@xxxxxxxxxx> wrote:
set srate [expr int(($tps_ok / $number_of_total_tps)*100)]
After two other responses, hinting towards floating point
math, I dare to hint towards doing multiplication first,
and division afterwards :-)
set srate [expr {$tps_ok*100/$number_of_total_tps}]
.
- References:
- Procedure for percent of a value
- From: Marcos Martinez Sancho
- Procedure for percent of a value
- Prev by Date: Re: tk 8.5 vs 8.4: "font actual" differences
- Next by Date: Re: tk 8.5 vs 8.4: "font actual" differences
- Previous by thread: Re: Procedure for percent of a value
- Next by thread: Re: Procedure for percent of a value
- Index(es):