Math.Sin And Math.Cos are they plugged?

Jan 17, 2012 at 6:46 PM

Hey guys, I was attempting to use Math.Sin and Math.Cos and they are not working, are they plugged? Thanks - Matt

Developer
Jan 17, 2012 at 6:58 PM

They should be plugged.

 

/HKS

Jan 17, 2012 at 7:07 PM
HKS wrote:

They should be plugged.

 

/HKS

Weird because, when I try to use them I am not getting the correct answer when I do in a C# Console program. So I think there is something wrong with Math.Sin and Math.Cos. Thanks - Matt

Developer
Jan 17, 2012 at 7:49 PM
Edited Jan 17, 2012 at 7:57 PM

Sin and Cos shoudl be fully plugged (and are fully precise, I plugged them myself :P), there are a few issues with conversions to floats and doubles though, so that may be your issue. Currently conversions from uint32->float/double, uint64->float/double, and int64->float/double don't currently work correctly. The issue with them is that I wasn't able to figure out how to handle the highest bit in the uint32, as there is only a signed float load. And I can't figure out how to do the 64-bit ones at all. Conversions from float/double to everything else do work just fine :P


Also, there are a few differences in the way we convert a float/double to a string. (If I recall correctly, one difference is that we somehow manage to get an extra decimal point out of the floats and doubles. We also don't currently return a correct E+ format string when required. (pretty sure we lose a decimal point somewhere, don't remember the exact problem atm. (Check the IRC in about an hour, I should be on, and I can get you the specifics of the issues.) ) )

Also, the asin family aren't fully precise because I don't know how the original writer of the code I used got the numbers, meaning I can't get a more precise version of it. (not without going into an insane ammount of division, which is much much slower than multiplication (we currently do it via multiplication)). Also, unless you need more than 8 decimal points precision, the asin family should work just fine for you :P

Developer
Jan 18, 2012 at 1:37 PM

This is only in a new post so that you'll actually see it :P (and so that I'll remember to actually check the reply :P)

What are the results you expected? And what are the results you got?

Developer
Jan 19, 2012 at 3:54 AM

From what I can see, and what orvid also said, it is working just fine, make sure you have the update version.

/HKS

Coordinator
Jan 19, 2012 at 7:54 AM
civilwarrock: what cosmos version are you using?


On Thu, Jan 19, 2012 at 4:54 AM, HKS <notifications@codeplex.com> wrote:

From: HKS

From what I can see, and what orvid also said, it is working just fine, make sure you have the update version.

/HKS

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Jan 19, 2012 at 1:41 PM
Edited Jan 19, 2012 at 1:42 PM

@mterwood, I'm pretty sure he's using the devkit, not sure when he last updated his devkit, but it should be after I implemented those plugs, and they were implemented after I got most of the conversion Op's working.