Comments (3)
Ignoring potential language changes, the last suggestion would be the right approach.
from coalton.
note: this is only an issue with the MPFR version of the library. The portable version handles this fine.
from coalton.
I've been thinking about this bug, and thought of a couple quick but potentially janky approaches for fixing it.
-
Every time precision is set, redefine
Trigonometric Big-Float
andExponentiable Big-Float
, which will automatically update the definition ofpi
andee
respectively. This could be kept in separate functions likereset-bf-constants
orset-precision-and-constants
. Bubble-gum and paperclip approach.- Note: Is it possible to redefine one member of a type class or does every redefinition have to be applied as a whole?
-
Convert
Big-Float
toMPFR-Float
and make a newBig-Float
type in the style ofimpl-default.lisp
that usesMPFR-Float
s instead ofDyadic
s. This is probably the nuclear option. -
Simplifying the possibility above, give
Big-Float
two constructors that contain either anMPFR-Float
object or a(Unit -> MPFR-Float)
function:
(define-type Big-Float
(BFValue MPFR-Float)
(BFConst (Unit -> MPFR-Float))
from coalton.
Related Issues (20)
- into-iter bug
- for sometimes causes a runtime type error
- add tests for all core language looping constructs
- Inliner doesn't work with `return` HOT 1
- `:coalton/benchmark` deprecated/impendingly deprecated HOT 1
- Improve presentation of low-level reader errors HOT 1
- Type error on over-application of anonymous functions
- Coalton package form: support "shadow" clause
- reference page links are broken HOT 2
- add warning when exported symbol denoting a value doesn't have an explicit type declaration
- Bad error message for undefined type in `Declare`
- Fun (Bad) error message for duplicate definitions in the same toplevel
- Misleading error for toplevel operations in the repl
- Error messages are way too long and don't get wrapped around in Emacs
- Duplicate key errors don't indicate source location HOT 1
- `Unused variable` error encourages additionally declaring the function name to be unused.
- SB-EXT package lock violation when trying to load Coalton via Quicklisp HOT 2
- Unclear error message for heterogenous list
- type-error during printing of typechecker error HOT 2
- Intro document should acknowledge implicit `fromint` casting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coalton.