How does fractional credit work?

Moderators: Site Moderators, FAHC Science Team

Post Reply
arisu
Posts: 466
Joined: Mon Feb 24, 2025 11:11 pm

How does fractional credit work?

Post 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.
muziqaz
Posts: 1722
Joined: Sun Dec 16, 2007 6:22 pm
Hardware configuration: 9950x, 7950x3D, 5950x, 5800x3D
7900xtx, RX9070, Radeon 7, 5700xt, 6900xt, RX 550 640SP
Location: London
Contact:

Re: How does fractional credit work?

Post 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
FAH Omega tester
Image
arisu
Posts: 466
Joined: Mon Feb 24, 2025 11:11 pm

Re: How does fractional credit work?

Post 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!
Post Reply