This Soviet project developed two Russian-language PLs: Robic[1] and Rapira[2]. Robic was similar to Logo, but unlike Logo, which had only one actor - a turtle, Robik had several: a Train, an Ant, a Painter, and so on
Rapira was more like SETL + Python. It was a dynamic interpreted PL with a rich set of compound data types, such as sets, records (associative arrays), and so on. Compared to the contemporary BASIC, it was ADVANCED
Like Logo, Robik was used to teach programming to kindergarthen-age children, while Rapira was aimed at high school students
In my school we had a Logo-like PL where you controlled a kangaroo and a more complex one where you сontrolled a robot arm with an internal stack that worked on a rectangular array of items. I remember the robot blowing up when you triggered a logical error like going out of bounds or a stack over/underflow.
Even if you have an insurable interest, moral hazard may arise - acting recklessly or other abuse, while knowing you are insured/covered. Somewhat similar to friendly fraud in retail/ecommerce.
Insurance normally has fine print about those things. Life insurance doesn't pay out for suicide. Fire insurance doesn't pay out if you intentionally burn your house down (the fire department also will investigate because even though it is their job they don't like risking their life fighting fires)
You can get insurance without the above provisions, but it will cost a lot more. Once in a while someone manages to collect on a claim for loss of their expensive cigars after they smoke them - but this is rare and usually not worth the cost.
This may vary by country, it isn't a subject I'm particularly familiar with, but at least in the UK that isn't true - many, I think most, life insurance policies here do pay out for suicide. There's just a period of years between the start of the policy and when suicide starts to be covered, to prevent people who are planning on killing themselves from being able to take out insurance just before doing so.
some life insurance policies pay out for suicide after an initial exclusion period. this is often six or twelve months. insurers can include it because suicide claims are relatively uncommon.
if there is evidence that someone took out the policy with the intention of creating a claim then the insurer may treat it as fraud and decline it.
0.0 + x = x
NaN + x = NaN
+1.0 + -1.0 = 0.0
+1.0 + +1.0 = NaN
-1.0 + -1.0 = NaN
-0.0 = 0.0
-(+1.0) = -1.0
-(-1.0) = +1.0
-NaN = NaN
x - y = x + (-y)
NaN * x = NaN
+1.0 * x = x
-1.0 * x = -x
0.0 * 0.0 = 0.0
/0.0 = NaN
/+1.0 = +1.0
/-1.0 = -1.0
/NaN = NaN
x / y = x * (/y)
More interestingly, how to implement in logic gates. Addition with a 2's complement full adder and NaN detector. Negation with a 2's complement negation circuit. Reciprocal with a 0.0 detector.
Multiplication with a unique logic circuit (use a Karnaugh map):
I'll use custom notation =? ≤≥? <? ≤? for comparison to distinguish from = < ≤.
x =? x = True
Otherwise, a =? b = False
NaN ≤≥? NaN = False
Otherwise, a ≤≥? b = a =? b
-1.0 <? 0.0 = True
-1.0 <? +1.0 = True
0.0 <? +1.0 = True
Otherwise, a <? b = False
a >? b = b <? a
a ≤? b = (a <? b | a ≤≥? b)
a ≥? b = (a >? b | a ≤≥? b)
In logic gates: For =?, bitwise equality. For ≤≥?, bitwise equality and a NaN detector. For <?, use:
ab <? cd = a&b&~c | ~a&~b&~c&d
I separate =? from ≤≥?. =? compares value, while ≤≥? compares order. NaN has no ordering, so it compares false. IEEE float only uses ≤≥? and names it ==.
It's better to first show truth tables, then K-maps, and only then logical formulas.
But the main question is: does this FP2 have any real applications? Maybe it could be useful when only one operand is FP2? Especially for vectorized math.
I'm just having fun. I wrote out the full truth tables and Karnaugh maps on paper, but I trust that you get the idea and can recreate it yourself. (Or, I can write a more detailed blog post, if you'd find that interesting.)
If I had to guess, we could use this for a very compact output of the sign function. [-Inf,0) maps to -1.0, 0 maps to 0.0, (0,Inf] maps to +1.0, and NaN maps to NaN. I don't know what application would need the sign function, though. I haven't needed it yet in my programming experience.
1. how far behind the West it was, and
2. that there were no other secrets
reply