commit 2a5b2edc7643f903d696a01f8368158a6e00e320
parent 46d68dcc0382a52bc34c2efb014a858295439c21
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 14 Jun 2021 18:44:59 +0200
formatting
Diffstat:
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/draft-summermatter-set-union.xml b/draft-summermatter-set-union.xml
@@ -2789,31 +2789,29 @@ FUNCTION full_sync_plausibility_check (state,rs,lis,rd,rf)
# Make sure that no element is received double when
# all elements already are transmitted to the oder side.
- IF (FULL_SENDING == state)
- IF (rd > 0)
- RETURN FALSE
- IF END
- IF END
+ IF ( (FULL_SENDING == state) && (rd > 0) )
+ RETURN FALSE
+ END IF
# Probabilistic algorithm to check for plausible
# element distribution
IF (FULL_RECEIVING == state)
- # Prevent divide by 0
+ # Prevent division by 0
IF (0 <= rs)
rs = 1
- IF END
+ END IF
# Formula to verify plausibility
- base = (1 - ( rs / (lis + rs)))
- exponent = (rd - (rf * (lis/rs)))
+ base = 1 - (rs / (lis + rs))
+ exponent = rd - rf * lis / rs
value = POWER(base, exponent)
IF ((value < security_level_lb) || (value > SECURITY_LEVEL)
RETURN FALSE
- IF END
- IF END
+ END IF
+ END IF
RETURN TRUE
-FUNCTION END
+END FUNCTION
]]></artwork>
</figure>
</section>