Re: Complex numbers
I think, like dividing by 0, you cannot take square root of -1 in rev. So there goes "i". No roots of any negative number in fact. I don't think it is in the SANE world, if that is even still used. Probably not. I wonder if Mathematica does that sort of thing? Craig Newman In a message dated 11/11/09 2:26:21 PM, b.cor...@gmx.net writes: > is there anyone who has written a library for computations with > complex numbers and is willing to share that with me? It would me > much appreciated. > > ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Complex numbers
is there anyone who has written a library for computations with complex numbers and is willing to share that with me? It would me much appreciated. many thanks, Beat Cornaz ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Complex Numbers & binary fractions
Cubist wrote : function DecFrac2BinFrac TheFrac, ThePrecision # TheFrac is *assumed* to have nothing to the *left* of the decimal point # ThePrecision is *assumed* to be a positive integer # you can write the code to handle those cases yourself, if need be, right? if ThePrecision = "" or ThePrecision < 1 then put 10 into ThePrecision # so the user can just supply a fraction and not care set the numberFormat to "0.#" #you want to make sure there's a leading 0 before the decimal put "." into Rezult repeat # yes, it's an infinite loop. the escape test will be inside it multiply TheFrac by 2 put char 1 of TheFrac after Rezult # because of numberFormat, char 1 here should be either 0 or 1 if the length of TheFrac > ThePrecision or TheFrac = 0 then exit repeat delete char 1 of TheFrac end repeat return Rezult end DecFrac2BinFrac Thanks Cubist. I'm often surprised at the original ways of coding that show up in this group. I'm refering here to > # because of numberFormat, char 1 here should be either 0 or 1. I want to point your attention to a little mistake: if the length of TheFrac > ThePrecision or TheFrac = 0 then exit repeat I think it should read : if the length of Rezult > ThePrecision or TheFrac = 0 then exit repeat I'm a bit surprised that no one has done anything with complex numbers. So I'll have to whip up something myself. If someone is interested, I'm willing to share the code (once I've coded it). mail me off list if you want to get it. Greetings, Beat -- ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Complex Numbers & binary fractions
sez [EMAIL PROTECTED]: >has anyone made a library for working with complex numbers? And is >willing to share this with me? I'm also looking for some code to >convert decimal fractions (i.e. 0.56384) to binary fractions. Haven't played with complex numbers, sorry. For converting decimal fractions to binary, however, something like this might work: function DecFrac2BinFrac TheFrac, ThePrecision # TheFrac is *assumed* to have nothing to the *left* of the decimal point # ThePrecision is *assumed* to be a positive integer # you can write the code to handle those cases yourself, if need be, right? if ThePrecision = "" or ThePrecision < 1 then put 10 into ThePrecision # so the user can just supply a fraction and not care set the numberFormat to "0.#" #you want to make sure there's a leading 0 before the decimal put "." into Rezult repeat # yes, it's an infinite loop. the escape test will be inside it multiply TheFrac by 2 put char 1 of TheFrac after Rezult # because of numberFormat, char 1 here should be either 0 or 1 if the length of TheFrac > ThePrecision or TheFrac = 0 then exit repeat delete char 1 of TheFrac end repeat return Rezult end DecFrac2BinFrac You really do have to worry about the precision of the result. Most decimal fractions simply don't *have* exact representations in binary; unless you explicitly define the precision, thus telling the code when to bail out, any non-binary-exact decimal fractions will cause the code to grind along forever, or until the growing length of the binary representation overfills all available RAM. Not good. Hope this helps... ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Complex Numbers & binary fractions
Hi, has anyone made a library for working with complex numbers? And is willing to share this with me? I'm also looking for some code to convert decimal fractions (i.e. 0.56384) to binary fractions. Thank you, greetings Beat. -- ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution