<MrMobius>
siraben, I mean like sine, cosine, and logs
<siraben>
MrMobius: Ah, floating point?
<MrMobius>
ya BCD floating point
<siraben>
I see. Why not use the IEEE representation? IIRC BCD is slow (to the determent of TI calculators)
<siraben>
MrMobius: Although, it can be tricky to implement IEEE from scratch.
<siraben>
Particularly the conversion and parsing routines.
jackdani1l has joined #forth
jackdaniel has quit [Disconnected by services]
jackdani1l is now known as jackdaniel
<Guest20698>
<siraben "MrMobius: Ah, floating point?"> Sin, cos, log &c are sometimes known as “transcendental functions”, because they are not “algebraic”, that is, expressible as (roughly speaking) the dependence of a root of a polynomial equation on a parameter (you see the analogy with transcendental and algebraic numbers). I guess that’s the usage MrMobius wanted to allude to
<siraben>
alexshpilkin: Right. I'm familiar with that definition of transcendental.
<Guest20698>
<siraben "MrMobius: Although, it can be tr"> Are there actually any convenient softfloat formats (and is it even possible to have such a thing)? As far as I’ve seen, doing IEEE floats in software usually involves disturbing amounts of bit wrangling and special cases
<proteusguy>
MrMobius, you plan on building temporary log tables and such? That's the only reason I can think of that makes gc relevant to this off hand.
<siraben>
proteusguy: Usually the tables are precomputed and stored, right?
<proteusguy>
siraben, yes but he's somehow bringing gc into the picture so maybe he has a word to computer & store them only when he needs.
Zarutian_HTC has quit [Ping timeout: 256 seconds]
Zarutian_HTC has joined #forth
<MrMobius>
siraben, I doubt it makes much of a difference on the Z80 since IIRC it has a DAA instruction
<MrMobius>
siraben, 0 overhead on 6507 since it has a BCD mode so just as fast as decimal
<MrMobius>
IEEE compatibility is a lot of work from what Ive heard. it would be more work than its worth since this is a fun project that doesnt have to interoperate with other systems
<MrMobius>
Guest20698, sure, lots of soft floating point schemes. take a look at some of the old 8 bit machines like the apple 2 or commodore 64
<MrMobius>
CORDIC can compute transcendentals with lookup tables if you have enough room for them. might have to go with something slower if it doesnt fit
<Guest20698>
MrMobius : I had no idea, thanks. I’ll look into that. Although I’m a little skeptical regarding correct rounding, AFAIK in pre-IEEE (or actually pre-8087) times noone knew how to do that even for basic arithmetic and only used hacks like guard bits, if that.
<patrickg>
"correct" rounding. Well, you have to define something
<Guest20698>
(Same story about transcendental functions—getting within a couple digits of precision isn’t difficult, but the things CRlibm does to get the best possible result scare me)
<Guest20698>
patrickg : I don’t understand your point. I take “correctly rounded” to mean “the mathematically exact result rounded according to the current rounding mode”, and as far as I’m aware it’s the only definition of the term
<patrickg>
Still there's a rounding mode to define
<Guest20698>
Round-to-nearest (possibly with some sort of tiebreaking rule), usually. I haven’t really seen the other possibilities mentioned outside vague references to interval arithmetic, though I’m in no way an expert
<MrMobius>
bankers rounding is one scheme
<Guest20698>
(round-to-nearest is “better” than the others in the sense that your error bound for an individual operation is half as big, so it stands to reason that you must be doing something fancy if you explicitly want something else)
xek_ has joined #forth
iyzsong has quit [Ping timeout: 256 seconds]
iyzsong has joined #forth
kori has quit [Quit: WeeChat 2.8]
kori has joined #forth
kori has joined #forth
kori has quit [Changing host]
kori has quit [Quit: WeeChat 2.8]
kori has joined #forth
kori has quit [Quit: WeeChat 2.8]
Zarutian_HTC has quit [Remote host closed the connection]