Fix #940351 (Unable to convert RTF file to MOBI OR TXT -)

This commit is contained in:
Kovid Goyal 2012-02-24 20:49:50 +05:30
parent ec8cc249ca
commit 8e79ba6893

View File

@ -54,6 +54,8 @@ class KeyMapper(object):
endp = 0 if size < base else 36
diff = (abs(base - size) * 3) + ((36 - size) / 100)
logb = abs(base - endp)
if logb == 0:
logb = 1e-6
result = sign * math.log(diff, logb)
return result