Page 1 of 1

How does fractional credit work?

Posted: Sat May 10, 2025 8:43 am
by arisu
Sometimes the credit awarded for a WU is not a whole number:

Code: Select all

$ curl -s https://api.foldingathome.org/project/12486/run/5/clone/5/gen/87 | python3 -m json.tool
[
    {
        "user": "Grimoire_of_Lolice",
        "team": 230362,
        "cpuid": "456F3C0C9570FC3A",
        "credit": 43917.6,
        "credit_time": "2025-05-09 16:31:53",
        "log_time": "2025-05-09 16:25:20",
        "assign_time": "2025-05-09 06:31:57",
        "days": 0.4121,
        "code": "Ok"
    }
]
How is it added to the user/team's total score? Is it rounded? Does the total score just keep track of fractional points? In the WU I posted, did it earn me 43917 points, 43918, or actually 43917.6 without loss of precision?

A forum search for "fractional credit" and a few variations turned up nothing.

Re: How does fractional credit work?

Posted: Sat May 10, 2025 8:50 am
by muziqaz
You must be really really bored to be worried about such details :D :D
I don't think there is rounding going on. Stats just cut the .6 off

Re: How does fractional credit work?

Posted: Sat May 10, 2025 8:59 am
by arisu
Not bored, but working on a script that collects information about a user's submitted WUs and generates statistics (performance statistics, project information, estimates things like loss of PPD caused by poor GROMACS load balancing or by a slow network etc). And I wanted to know if I should do int(credit) or round(credit) with the value that the API returns.

If it just cuts it off then I'll do the former, thanks!