mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-19 16:14:21 +01:00
The `likelihood(X,Y)` function returns argument X unchanged. The value Y in likelihood(X,Y) must be a floating point constant between 0.0 and 1.0, inclusive. ``` sqlite> explain SELECT likelihood(42, 0.0); addr opcode p1 p2 p3 p4 p5 comment ---- ------------- ---- ---- ---- ------------- -- ------------- 0 Init 0 6 0 0 Start at 6 1 Once 0 3 0 0 2 Integer 42 2 0 0 r[2]=42 3 Copy 2 1 0 0 r[1]=r[2] 4 ResultRow 1 1 0 0 output=r[1] 5 Halt 0 0 0 0 6 Goto 0 1 0 0 ``` ``` limbo> explain SELECT likelihood(42, 0.0); addr opcode p1 p2 p3 p4 p5 comment ---- ----------------- ---- ---- ---- ------------- -- ------- 0 Init 0 4 0 0 Start at 4 1 Copy 2 1 0 0 r[1]=r[2] 2 ResultRow 1 1 0 0 output=r[1] 3 Halt 0 0 0 0 4 Integer 42 2 0 0 r[2]=42 5 Goto 0 1 0 0 ``` Closes #1303