Re: [racket-dev] Math library pushed
Use git format-patch to create patch files for your range of commits and then apply them to the current head using git am Kevin On 11/17/2012 06:57 AM, Jens Axel Søgaard wrote: 2012/11/16 Neil Toronto neil.toro...@gmail.com: I've just made the initial commit for the math library. You will all notice the build time increase. Some will notice that (require math) imports a bunch of goodies that Racket didn't have before. About half is documented so far, and half has coverage in the test cases. Some things are known to be broken, but not many. The most egregious, which needs to be fixed very soon, is this one: I have made a pull request on Github with documentation on the number theory functions (and other stuff). However since Neil's initial commit didn't include the history, the pull request contains ~300 commits. Is there a better way to commit my changes? https://github.com/plt/racket/pull/169 _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
Well, you can also use git rebase. It basically the same as that, but easier. Robby On Sat, Nov 17, 2012 at 12:29 PM, Kevin Tew t...@cs.utah.edu wrote: Use git format-patch to create patch files for your range of commits and then apply them to the current head using git am Kevin On 11/17/2012 06:57 AM, Jens Axel Søgaard wrote: 2012/11/16 Neil Toronto neil.toro...@gmail.com: I've just made the initial commit for the math library. You will all notice the build time increase. Some will notice that (require math) imports a bunch of goodies that Racket didn't have before. About half is documented so far, and half has coverage in the test cases. Some things are known to be broken, but not many. The most egregious, which needs to be fixed very soon, is this one: I have made a pull request on Github with documentation on the number theory functions (and other stuff). However since Neil's initial commit didn't include the history, the pull request contains ~300 commits. Is there a better way to commit my changes? https://github.com/plt/racket/pull/169 _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
Hi All, Thanks to Asumu, Erich and a few others on the irc channel I got it working. I tried rebasing, but couldn't make it work. I am not sure why. The resulting pull request still had the entire history. Then I tried making a new branch. Reseting to a point before Neils initial commit. Then fetching and merging the plt/racket repository and finally cherry-picking the commits I needed. -- Jens Axel Søgaard _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
I just read the documentation. This is great stuff. Some choices quotes and comments: [sum] is like (apply + xs), but incurs rounding error only once when adding inexact numbers. (In fact, the inexact numbers in xs are summed separately using flsum.) Use (random-natural k) instead of (random k) when k could be larger than 4294967087. [flhypot] computes (flsqrt (+ (* x x) (* y y))) in way that overflows only when the answer is too large. xrefs in flfactorial are broken. All of fllog1p and flexpm1 xrefs in section 2.2 are broken In log space, exponentiation becomes multiplication, multiplication becomes addition, and addition becomes tricky. See lg+ and lgsum for solutions. I like that catastrophic cancellation is a technical term in this document. flonum-ordinal is ridiculous The beginning of section 3 is interesting. The example in the lambert section is neat. xrefs in gamma-inc are broken, same with beta-inc The inverse documentation (and a few other of the number theoretic functions) have contracts errors that don't seem intentional You should document the efficiency of prime? You need racket/function in 4.5's evals 4.6 should use @link All of 5.2 is fascinating On Fri, Nov 16, 2012 at 11:59 AM, Neil Toronto neil.toro...@gmail.com wrote: I've just made the initial commit for the math library. You will all notice the build time increase. Some will notice that (require math) imports a bunch of goodies that Racket didn't have before. About half is documented so far, and half has coverage in the test cases. Some things are known to be broken, but not many. The most egregious, which needs to be fixed very soon, is this one: * Because of recent changes to how Typed Racket deals with Any types at the contract boundary, typed/rackunit cannot now test higher-order values, such as arrays. * A practical consequence is that math/tests/array-tests.rkt simply doesn't run. One thing I'm not sure of is whether the FFI to libmpfr works on all our supported platforms. Could I have all the devs run the following program after your next compile? #lang racket (require math/bigfloat) (parameterize ([bf-precision 8192]) pi.bf) Then reply with the last four digits printed. They should be 4888. If the program doesn't run because Racket can't load libmpfr, it's an opportunity to test the documentation. Please see if I've made the docs for the `math/bigfloat' module clear enough to help you fix the problem. Thanks! Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev -- Jay McCarthy j...@cs.byu.edu Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay The glory of God is Intelligence - DC 93 _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
I'm seeing two build problems on Mac OS X: * No libmpfr.dylib This looks like a problem with `math/private/matrix/matrix-sequences' importing `math/matrix' at too many phases. Removing the `for-syntax' and `for-template' imports let me get past this one. (I won't be able to run `math' libraries without libmpfr.dylib, but I should be able to compile them.) * require: unknown module module name: #resolved-module-path:(submod /Users/mflatt/proj/plt/collects/math/special-functions.rkt typed-module5) So far, this one looks like a problem with finding a submodule in a .zo file --- that is, a bug that I will have to track down and fix. At Fri, 16 Nov 2012 11:59:59 -0700, Neil Toronto wrote: I've just made the initial commit for the math library. You will all notice the build time increase. Some will notice that (require math) imports a bunch of goodies that Racket didn't have before. About half is documented so far, and half has coverage in the test cases. Some things are known to be broken, but not many. The most egregious, which needs to be fixed very soon, is this one: * Because of recent changes to how Typed Racket deals with Any types at the contract boundary, typed/rackunit cannot now test higher-order values, such as arrays. * A practical consequence is that math/tests/array-tests.rkt simply doesn't run. One thing I'm not sure of is whether the FFI to libmpfr works on all our supported platforms. Could I have all the devs run the following program after your next compile? #lang racket (require math/bigfloat) (parameterize ([bf-precision 8192]) pi.bf) Then reply with the last four digits printed. They should be 4888. If the program doesn't run because Racket can't load libmpfr, it's an opportunity to test the documentation. Please see if I've made the docs for the `math/bigfloat' module clear enough to help you fix the problem. Thanks! Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
2012/11/16 Matthew Flatt mfl...@cs.utah.edu: * require: unknown module module name: #resolved-module-path:(submod /Users/mflatt/proj/plt/collects/math/special-functions.rkt typed-module5) So far, this one looks like a problem with finding a submodule in a .zo file --- that is, a bug that I will have to track down and fix. This is the error, I ran into, when I tried to merge in documentation for the number theory functions. Is there a workaround? -- Jens Axel Søgaard _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
At Fri, 16 Nov 2012 21:21:29 +0100, Jens Axel Søgaard wrote: 2012/11/16 Matthew Flatt mfl...@cs.utah.edu: * require: unknown module module name: #resolved-module-path:(submod /Users/mflatt/proj/plt/collects/math/special-functions.rkt typed-module5) So far, this one looks like a problem with finding a submodule in a .zo file --- that is, a bug that I will have to track down and fix. This is the error, I ran into, when I tried to merge in documentation for the number theory functions. Is there a workaround? Unfortunately, I don't see a workaround for older versions. I've fixed it in the current git master, though. _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
A fix is even better! Thanks, Jens Axel 2012/11/16 Matthew Flatt mfl...@cs.utah.edu: At Fri, 16 Nov 2012 21:21:29 +0100, Jens Axel Søgaard wrote: 2012/11/16 Matthew Flatt mfl...@cs.utah.edu: * require: unknown module module name: #resolved-module-path:(submod /Users/mflatt/proj/plt/collects/math/special-functions.rkt typed-module5) So far, this one looks like a problem with finding a submodule in a .zo file --- that is, a bug that I will have to track down and fix. This is the error, I ran into, when I tried to merge in documentation for the number theory functions. Is there a workaround? Unfortunately, I don't see a workaround for older versions. I've fixed it in the current git master, though. -- -- Jens Axel Søgaard _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
I get this message (during doc build, actually): raco setup: error running: (lib math/scribblings/math.scrbl) ffi-lib: couldn't open libmpfr.so (libmpfr.so: cannot open shared object file: No such file or directory) I have /usr/lib/libmpfr.so.1, which is symlinked to /usr/lib/libmpfr.so.1.2.2. I expect that libmpfr.so (no version number) is provided by the development package. I changed math/private/bigfloat/mpfr.rkt to use the following lines instead: (define libgmp (lazy (ffi-lib libgmp '( 3) #:get-lib-dirs get-lib-dirs))) (define libmpfr (lazy (ffi-lib libmpfr '( 1) #:get-lib-dirs get-lib-dirs))) (Running 32-bit Ubuntu 10.04.4) When I run the test file with the changes, it works, and the last four digits are 4888 as expected. Looks like my work machine (64-bit Ubuntu 12.10) has libmpfr.so.4 and libgmp.so.10. I haven't run the test program there yet. Ryan On 11/16/2012 01:59 PM, Neil Toronto wrote: [...] One thing I'm not sure of is whether the FFI to libmpfr works on all our supported platforms. Could I have all the devs run the following program after your next compile? #lang racket (require math/bigfloat) (parameterize ([bf-precision 8192]) pi.bf) Then reply with the last four digits printed. They should be 4888. If the program doesn't run because Racket can't load libmpfr, it's an opportunity to test the documentation. Please see if I've made the docs for the `math/bigfloat' module clear enough to help you fix the problem. Thanks! Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Math library pushed
From the cheap seats. Built clean. Except for warning below. Test failed as libffi as initially was not found by the dynamic load. After adjusting version in mpfr.rkt. Test produced pi ... 4888 Applicable lib version on Ubuntu 12.10. /usr/lib/x86_64-linux-gnu/libmpfr.so.4 /usr/lib/x86_64-linux-gnu/libmpfr.so.4.1.0 raco setup: WARNING: undefined tag in math/scribblings/math.scrbl: raco setup: ((lib math/main.rkt) dist-pdf) raco setup: ((lib math/main.rkt) untyped-prev-prime) raco setup: ((lib math/main.rkt) factorial) raco setup: ((lib math/main.rkt) mod) raco setup: ((lib math/main.rkt) beta-dist) raco setup: ((lib math/main.rkt) untyped-next-prime) raco setup: ((lib math/main.rkt) gamma-dist) raco setup: ((lib math/main.rkt) flexpt1p) raco setup: ((lib math/main.rkt) normal-dist) On Fri, Nov 16, 2012 at 1:59 PM, Neil Toronto neil.toro...@gmail.comwrote: I've just made the initial commit for the math library. You will all notice the build time increase. Some will notice that (require math) imports a bunch of goodies that Racket didn't have before. About half is documented so far, and half has coverage in the test cases. Some things are known to be broken, but not many. The most egregious, which needs to be fixed very soon, is this one: * Because of recent changes to how Typed Racket deals with Any types at the contract boundary, typed/rackunit cannot now test higher-order values, such as arrays. * A practical consequence is that math/tests/array-tests.rkt simply doesn't run. One thing I'm not sure of is whether the FFI to libmpfr works on all our supported platforms. Could I have all the devs run the following program after your next compile? #lang racket (require math/bigfloat) (parameterize ([bf-precision 8192]) pi.bf) Then reply with the last four digits printed. They should be 4888. If the program doesn't run because Racket can't load libmpfr, it's an opportunity to test the documentation. Please see if I've made the docs for the `math/bigfloat' module clear enough to help you fix the problem. Thanks! Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/**dev http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev