What is the revlog ease value in FSRS

I noticed that upon switching FSRS on the reviewer writes a value into the ease col of each revlog. This value seems to between 0-1000 and divided by 100 is close the displayed Difficulty in the card stats but not quite.

Is this some intermediate variable used in the FSRS equation from which Difficulty is calculated?

difficulty_shifted()

Thanks, I found the source code part to read with this. So, to convert it to the same format shown in card stats where difficulty is a percentage 0-100%, I can simply use (fct - 100) / 10%

I now have a second question: how is card.memory_state.difficulty calculated? It doesn’t seem to be simply the difficulty gotten from the latest revlog which what the card stats say is the current difficulty.

One card’s stats in the UI

The last factor for this card is 870, which is then the current difficulty 77%: (870 - 100) / 10 = 0.77. The value I get for card.memory_state.difficulty is 7.929999828338623 so it’s not the same calculation happening there.

I’m guessing card.memory_state.difficulty is gotten from the rust backend’s compute_memory_state function?

rowFromStats()

(7.93 - 1.0) / 9.0 * 100 = 77.0