[suby-talk] Symbolic Logic
calamitas at advalvas.be
Thu Oct 6 15:39:46 EDT 2005
On Tue, 4 Oct 2005, TRANS wrote:
> I'm not sure. Seems like #2 is the most proper? If its too complex for
> the time being I would probably make is raise an error, perhaps
> something a little more specialized then divide by zero, then come
> back to it. If you want to represent general solution ranges though,
> eventually "mulitranges" will need to be supported.
I know. Although I could always approximate by filling the gaps. I've got
the impression that multiranges would go beyond what I intended at first.
I mean, that's no longer about precision. Of course that doesn't mean I
can't do it of course.
> How are you representing Infinity btw?
I'm not yet. I assume you want to point out to me that Mega has an
Infinity class ;-) Well, seems it has a bug though:
NoMethodError: private method `new' called for Infinity:Class
>From what I can see, seems you want it to be more than just infinity.
Isn't Aleph0 and so on supposed to be different from infinity? I thought
they invented the Aleph numbers because infinity is way too crude a
measure for this. Besides, if you want to go all the way, use ordinal
numbers; they're much more fun! Even the Aleph numbers can't match ordinal
> Hmm. Ruby has a Complex class already. I would guess that doing the
> precision for a couple of numbers would be readily exrapolated from
> the single number cases, but obviously I'm not there to know.
> Nonethless, I would probably take the same approach. Get the main of
> it down and come back to complex numbers later.
Well, I think I've got an idea of how to do this. It's an approximation,
but at some point we'll have to revert to approximations anyhow. It looks
Complex.new(5.pm(2), 7.pm(3)) # => Complex(5.0 (3.0..7.0), 7.0 (4.0..10.0))
It's an approximation because of this:
Complex.new(1, 1) # => Complex(1, 1)
Complex.new(1, 1) * 5.pm(2) # => Complex(5.0 (3.0..7.0), 5.0 (3.0..7.0))
This would include Complex(3.0, 7.0) among the possibilities, although
this is not a multiple of Complex.new(1, 1). I don't know how to do better
in general. Maybe I'll figure it out yet.
> Oh wow. That's really going the distance! You're going to be half way
> to RubyMathematica before you're though ;-)
Yeah, that's the goal, definitely! (It really helps to pose realistic
goals, doesn't it? ;-)
> Hmm... Maybe we should package up all this units/math stuff into it's
> own project? Or do you think it better being a part of Mega? BTW I'm
> thinking of reviving the name Facets --I have gotton a lot of people
> wrtting me about Facets recently. Seems more people are using Facets
> then Nano/Mega. Just have to figure out the best way to handle this
> smoothly --which is the main reason Roll came about, so I could give
> parts of a lib different aliases, versioning was actaully just a side
Well, it seems like once we're through with our plans, this thing will be
quite big. So maybe a separate project is better indeed. But we'll see,
it's a lot of work and it may very well never get finished.
More information about the suby-talk