Commit Graph

9 Commits

Author SHA1 Message Date
Matthew Flatt
7768b09118 unbox local floating-point arithmetic
Avoid allocating a flonum object for floating-opint calculations
that are consumed only by other floating-point caculations.

For this first cut, unboxing applies only to fl+, fl-, fl*, fl/,
flabs, fl<, fl<=, fl=, fl>, fl>=, bytevector-ieee-double-[native-]ref,
and bytevector-ieee-double-[native-]set!. Local variables can be
unboxed in the same way as implicit temporaries, and loop arguments
can be unboxed, but values in a closure and function-call arguments
are always boxed.

arm32 support is mostly in place, but not yet right. ppc32 support is
not yet implemented.

This commit includes a small change that is incompatible with previous
Chez Scheme versions: `(fl= +nan.0)` (and similar for other
comparisons) produces true instead of false.

original commit: 36459e43f10705aa3e383376ca7d54cf2998b7ee
2020-05-31 17:08:38 -06:00
Matthew Flatt
c5ee80bf0d adjust flonum printing to be more like %g
Adjust the choice between exponential and not.

Closes racket/racket#3195

original commit: 3a71e6fb6240d1c9e206064a613835c6eea871aa
2020-05-20 06:21:39 -06:00
Matthew Flatt
1116287328 adjust sqrt and log on -0.0
original commit: 098fdb7d197bda4cd1ecc9b68407ee72fcce9311
2019-06-21 12:48:42 -06:00
Matthew Flatt
8479c4bebf print positive flonum exponents with "+"
original commit: bcf4dd26d268e25a89f24edc4ae7c75c97411c6d
2019-06-21 12:19:59 -06:00
Matthew Flatt
6cd6071c3a update test case for number->string changes
Should have been part of 1976cd57b6.

original commit: a48f3525d764938cfc1a343d810b5f0f0b14dbbb
2019-05-22 13:41:50 -06:00
Matthew Flatt
b945bc9318 fixups for eqvnan and expt merges
original commit: 95165bd192db6136583a7141587173900e2da0c9
2019-01-18 07:52:51 -07:00
Bob Burger
831ea8ad18 changed copyright year to 2017
7.ss, scheme.1.in, comments of many files

original commit: 06f858f9a505b9d6fb6ca1ac97234927cb2dc641
2017-04-06 11:41:33 -04:00
dybvig
bf38db8ed9 - modified floatify_normalize to properly round denormalized results and
obviated scale_float in the process.
    number.c,
    ieee.ms
- fixed 0eNNNN for large NNNN to produce 0.0 rather than infinity
    strnum.ss,
    5_3.ms
- the reader now raises an exception with condition type implementation
  restriction (among the other usual lexical condition types), and
  string->number now raises #f, for #e<m>@<a>, where <m> and <a> are
  nonzero integers, since Chez Scheme can't represent polar numbers other
  than 0@<a> and <m>@0 exactly.  <m>@<a> still produces an inexact result,
  i.e., we're still extending the set of inexact numeric constants beyond
  what R6RS dictates.  doing this required a rework of $str->num, which
  turned into a fairly extensive rewrite that fixed up a few other minor
  issues (like r6rs:string->number improperly allowing 1/2e10) and
  eliminated the need for consumers to call $str->num twice in cases
  where it actually produces a number.  added some related new tests,
  including several found lacking by profiling.  added a couple of
  checks to number->string whose absence was causing argument errors to
  be reported by other routines.
    strnum.ss, exceptions.ss, read.ss
    5_3.ms, 6.ms, root-experr*, patch*
- added pdtml flag, which if set to t causes profile-dump-html to be
  called at the end of a mat run.
    mats/Mf-base

original commit: 03f2fe86171b0fd096238280b351ce365c701450
2016-05-01 16:05:40 -04:00
dyb
1356af91b3 initial upload of open-source release
original commit: 47a210c15c63ba9677852269447bd2f2598b51fe
2016-04-26 10:04:54 -04:00