diff options
| author | Erik Martin-Dorel | 2019-07-03 15:08:44 +0200 |
|---|---|---|
| committer | Pierre Roux | 2019-11-01 10:21:16 +0100 |
| commit | f155ba664a782f000e278d97ee5666e2e7d2adea (patch) | |
| tree | c7d9ddacde2059e4fa4745ce32395b9150764a1e /kernel/byterun/coq_interp.c | |
| parent | f8fdc27f922694edf74a7b608de1596e0a1ac0e3 (diff) | |
Add "==", "<", "<=" in PrimFloat.v
* Add a related test-suite in compare.v (generated by a bash script)
Co-authored-by: Pierre Roux <pierre.roux@onera.fr>
Diffstat (limited to 'kernel/byterun/coq_interp.c')
| -rw-r--r-- | kernel/byterun/coq_interp.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kernel/byterun/coq_interp.c b/kernel/byterun/coq_interp.c index 6e6adb1293..c21aeecb16 100644 --- a/kernel/byterun/coq_interp.c +++ b/kernel/byterun/coq_interp.c @@ -1545,6 +1545,33 @@ value coq_interprete Next; } + Instruct (CHECKEQFLOAT) { + print_instr("CHECKEQFLOAT"); + CheckFloat2(); + accu = coq_feq(Double_val(accu), Double_val(*sp++)) ? coq_true : coq_false; + Next; + } + + Instruct (CHECKLTFLOAT) { + print_instr("CHECKLTFLOAT"); + CheckFloat2(); + } + Instruct (LTFLOAT) { + print_instr("LTFLOAT"); + accu = coq_flt(Double_val(accu), Double_val(*sp++)) ? coq_true : coq_false; + Next; + } + + Instruct (CHECKLEFLOAT) { + print_instr("CHECKLEFLOAT"); + CheckFloat2(); + } + Instruct (LEFLOAT) { + print_instr("LEFLOAT"); + accu = coq_fle(Double_val(accu), Double_val(*sp++)) ? coq_true : coq_false; + Next; + } + Instruct (CHECKCOMPAREFLOAT) { double x, y; print_instr("CHECKCOMPAREFLOAT"); |
