forked fromdotnet/fsharp
- Notifications
You must be signed in to change notification settings - Fork0
Commitaf6fe4e
Support for rational exponents in units of measure
commit fd77e404911ea3948d8d6b59c9a53522eba2cef4Author: latkin <latkin@microsoft.com>Date: Wed Jan 7 17:15:14 2015 -0800 Further overflow/parsing fixes: check denominators, convert to bigint before negationcommit 09e892b3eda586775767cef1866c994ace07d217Author: andrewjkennedy <akenn@microsoft.com>Date: Wed Jan 7 11:40:53 2015 +0000 Make parsing of -2147483648 in rational exponents an errorcommit 050b8b67c30c6857353d70449955c9872939b42aAuthor: latkin <latkin@microsoft.com>Date: Tue Jan 6 14:48:11 2015 -0800 Remove unused error messagecommit 75b99d8561ff9aee087dc856cde106d6b4053622Author: latkin <latkin@microsoft.com>Date: Tue Jan 6 14:35:07 2015 -0800 Deleting obsolete testscommit ac97bcb9eb1079381c50071b5e3d95e21f21a12cMerge:f11c636 1877dffAuthor: latkin <latkin@microsoft.com>Date: Mon Jan 5 15:58:51 2015 -0800 Merge branch 'unitsexprat' ofhttps://git01.codeplex.com/forks/andrewjkennedy/fsharpcontrib into rationalexp Conflicts: src/fsharp/FSComp.txtcommit 1877dff5235e538b6b406a17478ce9b81bad735bAuthor: andrewjkennedy <akenn@microsoft.com>Date: Tue Dec 30 12:08:50 2014 +0000 Testscommit f7255be543782ae2aa5ed570c731eeb74d2205a1Author: andrewjkennedy <akenn@microsoft.com>Date: Mon Dec 29 15:37:59 2014 +0000 Added ref to System.Numericscommit 47180d60e4607233efe8a52be3f241c478793684Author: andrewjkennedy <akenn@microsoft.com>Date: Mon Dec 29 15:18:48 2014 +0000 Parsing of rational exponents is brokencommit b5ce68705045ed9944183f8238c478f7db575aa5Author: andrewjkennedy <akenn@microsoft.com>Date: Mon Dec 29 13:47:26 2014 +0000 Revert "Overflow exception catching" This reverts commit 9259f5374d0d4f20f0fb5fb4ef43e0eba71027ae.commit 11e1ed21ccf05a0552c97d635c3b91e6e6397691Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Mon Dec 29 13:30:21 2014 +0000 Use BigIntegers for rationalscommit 9259f5374d0d4f20f0fb5fb4ef43e0eba71027aeAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Mon Dec 29 13:29:23 2014 +0000 Overflow exception catchingcommit 3b835e9b20e580b01bac7e81ea53cfaa36ac06c5Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Mon Nov 3 17:38:57 2014 +0000 Error message for non-parenthesized unitscommit 3160dbbac9e9e2799eb3fe13239525fa8ce8c568Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Mon Nov 3 16:18:31 2014 +0000 Improved error when parentheses are omitted from exponentcommit f24e688d7794263f7dabb40f4ac9a498e82d517dAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Mon Nov 3 13:24:59 2014 +0000 Negative test for rational exponent parsingcommit 1e55326403626df25776226501bc8fedfc089adbAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Mon Nov 3 11:21:05 2014 +0000 Zero denominator testcommit f50f36f8603420298316ce966eb2e156e4052839Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Mon Nov 3 11:07:47 2014 +0000 Small improvements as suggested by Doncommit 71fe676f97bf06dbf165defb0b1e10a250266126Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Mon Nov 3 11:07:02 2014 +0000 Some positive tests for rational exponentscommit 0ac8fdc68ba807920c22b212be549751aa141548Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Thu Oct 30 13:44:44 2014 +0000 Fix bug on too many measure variables e.g. let f(x:float<'a 'b>) = x;;commit 2a227d0f4463d117f3022b34a18733e3b98d8594Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Thu Oct 30 10:58:49 2014 +0000 Check for 0 denominatorcommit 67acf8465ea5bfcb8766f7045ba5b47bf1a51fc5Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Thu Oct 30 10:41:05 2014 +0000 Couple of non-integer exponent testscommit 89881e2a94cf0e220051d68393d5e184ddc4634eAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Thu Oct 30 10:16:18 2014 +0000 u_rational should be outside #ifdefcommit 8461d5ee8632e15555680bc41cfea241f5ad7e5dAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Wed Oct 29 11:05:14 2014 +0000 Updated commentscommit c9da07d8f06311e2e62958e675f8082329651bf1Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Wed Oct 29 10:40:09 2014 +0000 Parentheses Revert LessGeneric testcommit b6090279f81f6583d5a2bec18eeaebb308506148Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Tue Oct 28 15:42:18 2014 +0000 Negative test baseline - can now take sqrt of m!commit a69bfc41a0184784bee44c7a08f3206525b1ce81Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Tue Oct 28 14:58:50 2014 +0000 Simplification to simplification: compute reduced row echelon form then normalize exponents Syntax of negative rationals: permit either u^-(2/3) or u^(-2/3)commit 4a6143daaf38909d5b75e34d5fd4b036f4b862ccAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Tue Oct 28 11:21:17 2014 +0000 More efficient representation of measures. Separate rational implementation. Better simplified form.commit 323d627288948359795797060216d8fe7d4676cfAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Fri Oct 17 13:46:54 2014 +0100 Normalization of unit variable exponents in type schemes Insist on parentheses around rational constants - otherwise how do we parse float<kg^2/s> Still an issue with warnings wrt "too generic"commit 547444819d02f7df2f49b69c5ef32b039d58859bAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Thu Oct 16 14:53:43 2014 +0100 Comment out measure unification algorithm and replace with one that makes use of rational exponents. Simpolification of type schemes will currently fail if any unit variables have non-integer exponent.commit 82b5fe40c907aae75036982dc7a4b168410e66e1Author: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Thu Oct 16 14:33:58 2014 +0100 TAST support for rational exponents; pretty-printing; pickling Solver currently projects out integers, fails on non-integerscommit d558956a1476d79b6aaa52e6ccf6d1f2f5372dacAuthor: andrewjkennedy <akenn@MSRC-3617024.europe.corp.microsoft.com>Date: Thu Oct 16 11:52:49 2014 +0100 Implement syntax for rational exponents in units-of-measure Flag syntax error in type-checker if rational exponent encountered, for now1 parent30ed635 commitaf6fe4e
File tree
26 files changed
+397
-181
lines changed- src/fsharp
- FSharp.Compiler-proto
- FSharp.Compiler
- FSharp.LanguageService.Compiler
- tests
- fsharpqa/Source/Conformance/UnitsOfMeasure
- Basic
- Diagnostics
- Parenthesis
- TypeChecker
- fsharp
- core/measures
- typecheck/sigs
26 files changed
+397
-181
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
| |||
501 | 507 | | |
502 | 508 | | |
503 | 509 | | |
| 510 | + | |
504 | 511 | | |
505 | 512 | | |
506 | 513 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
| |||
450 | 456 | | |
451 | 457 | | |
452 | 458 | | |
| 459 | + | |
453 | 460 | | |
454 | 461 | | |
455 | 462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
814 | 815 | | |
815 | 816 | | |
816 | 817 | | |
817 | | - | |
818 | | - | |
| 818 | + | |
| 819 | + | |
819 | 820 | | |
820 | 821 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
825 | 828 | | |
826 | 829 | | |
827 | 830 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
263 | 272 | | |
264 | 273 | | |
265 | 274 | | |
| |||
423 | 432 | | |
424 | 433 | | |
425 | 434 | | |
426 | | - | |
427 | | - | |
| 435 | + | |
| 436 | + | |
428 | 437 | | |
429 | 438 | | |
430 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
368 | | - | |
| 369 | + | |
369 | 370 | | |
370 | | - | |
371 | | - | |
| 371 | + | |
| 372 | + | |
372 | 373 | | |
373 | 374 | | |
374 | | - | |
| 375 | + | |
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
| |||
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | 451 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
475 | 459 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
501 | 474 | | |
502 | 475 | | |
503 | 476 | | |
504 | 477 | | |
505 | | - | |
506 | 478 | | |
507 | 479 | | |
508 | 480 | | |
509 | 481 | | |
510 | 482 | | |
511 | | - | |
| 483 | + | |
512 | 484 | | |
513 | 485 | | |
514 | 486 | | |
515 | 487 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
532 | 498 | | |
533 | 499 | | |
534 | 500 | | |
| |||
570 | 536 | | |
571 | 537 | | |
572 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
573 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
574 | 554 | | |
575 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
576 | 571 | | |
577 | 572 | | |
578 | 573 | | |
579 | 574 | | |
580 | 575 | | |
581 | | - | |
582 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
583 | 579 | | |
584 | 580 | | |
585 | 581 | | |
| |||
593 | 589 | | |
594 | 590 | | |
595 | 591 | | |
596 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
597 | 596 | | |
598 | 597 | | |
599 | 598 | | |
| |||
602 | 601 | | |
603 | 602 | | |
604 | 603 | | |
605 | | - | |
606 | | - | |
607 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
608 | 607 | | |
609 | 608 | | |
610 | 609 | | |
| |||
0 commit comments
Comments
(0)