This contribution is a solution to Not displaying accounts with reputation <25 via the "?info accountname" function!.

@theaustrianguy bug report directs DACH-Discord server bot by @jedigeiss.

### What was the issue(s)?

According to bughunter, `?info accountname`

command didn't display any info for users with reputation under 25. This is not exactly true, because the issue was with accounts of reputation < 0.

Examples:

`?info berniesanders`

(-17) - no response`?info dzordyja`

(-1) - no response

### Why is that?

Traversing through the code, it threw error at line:

`rep = math.log10(rep)`

where `rep`

is raw reputation stored in blockchain. It is very large (or very small) number. According to steemd.com for berniesanders it is value of `-46,967,291,106,564`

.

The math rule says common logarithm cannot calculate negative input numbers. That's why `ValueError: math domain error`

happens exiting whole call.

### Steem official formula

Steemit.com FAQ relates to nice article with formula explanation.

- Take the log base 10 of the raw score
- Subtract 9
- Multiply by 9
- Add 25
- Round down to the nearest integer

Code snippet by @digitalnotvir

### What was the solution?

To keep things simple I have verified if raw reputation score is negative. Then calculated absolute value of it and logarithm of. Attached negative sign again to the result (if marked) and keep through rest of formula.

Formula for reputation level including negativeness

### Links

https://github.com/jedigeiss/dach-support/pull/16

*Posted on Utopian.io - Rewarding Open Source Contributors*

mys (59)· 4 months agoUpvote

wehmoen (59)· 4 months agoThank you for the contribution. It has been approved.

You can contact us on Discord.

[utopian-moderator]mys (59)· 4 months agoThanks a lot!

utopian.tip (46)· 4 months agoHey @wehmoen, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

tanisha786 (49)· 4 months agodear @mys

All your posts are good, which can be learned a lot,

thank you

yusefendy (39)· 4 months agoGood post my friend @mys

atjehsteemit (52)· 4 months agoNice post

azrai (36)· 3 months agoVery good content