yuzi-co / Forager

Advanced multi-algo profit switching miner
GNU General Public License v3.0
24 stars 14 forks source link

UtilizationMem division by zero #17

Closed VukaKun closed 6 years ago

VukaKun commented 6 years ago

Include.ps1 at line 237:

UtilizationMem = [int]($($CardData | Where-Object SrcName -match "^(GPU\d* )?memory usage").Data / $($CardData | Where-Object SrcName -match "^(GPU\d* )?memory usage").MaxLimit * 100)

This often results in division by zero. I managed to fix it by changing it to UtilizationMem = [float]($($CardData | Where-Object SrcName -match "^(GPU\d* )?memory usage").Data / [float]$($CardData | Where-Object SrcName -match "^(GPU\d* )?memory usage").MaxLimit * 100 + 0.001),

but surely there must be a better way.

yuzi-co commented 6 years ago

fixed )