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 (61)· 7 months agoUpvote

wehmoen (60)· 7 months agoThank you for the contribution. It has been approved.

You can contact us on Discord.

[utopian-moderator]mys (61)· 7 months agoThanks a lot!

utopian.tip (46)· 7 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)· 7 months agodear @mys

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

thank you

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

atjehsteemit (52)· 7 months agoNice post

azrai (36)· 6 months agoVery good content