Code
Plex
Open Source Community
Register
|
Sign In
|
CodePlex Home
Home
Downloads
Documentation
Discussions
Issue Tracker
Source Code
People
License
Close
RSS
All Project Updates
Discussions
Issue Tracker
Releases
Reviews
Source Code
Wiki & Documentation
RSS
Basic View
|
Advanced View
|
Create New Item
1
vote
closed
Plug needed. System.Double System.Math.Sqrt(System.Double)
Description
yah ive been using cosmos for a while and when i tried Math.Sqrt(100);
it gave me this error:
System.Exception: Plug needed. System.Double System.Math.Sqrt(System.Double)
how would i go about creating a plug?
File Attachments
No files are attached
Closed
Apr 23 2011 at 11:25 AM
by
Trivalik
Its fixed, so.
Comments
Ca11um
wrote
Jan 22 2011 at 2:09 AM
Square root is easy, it's the number to the power of 0.5
mscoolnerd
wrote
Sep 1 2010 at 6:14 AM
I'm working on writing a few plugs for System.Math, i'll try working on it.
xdalutzx
wrote
Jul 30 2010 at 9:32 PM
int sqrt2(int x)
{
for (double y = 1, y2 = 2; y <= x; y++, y2++)
{
if (y * y == x)
{
return y;
}
else if (y * y < x && y2 * y2 > x)
{
int y1 = y;
int y3 = y2;
int n = 0, m = 0;
for (; y * y < x; y += 0.1, n++){;}
for (; y2 * y2 > x; y2 -= 0.1, m++){;}
if (n < m) return y1;
else return y3;
}
}
return 0;
}
if u use this method it gives sqrt for an int and it also rounds so if the accual sqrt is 9.8 it will return 10 and if its 4.2 it returns 4
smremde
wrote
Jul 26 2010 at 12:44 PM
Best to have a look at some existing ones however:
Sqrt can be done quickly on hardware - so you would have to write it in ASM look for an ASM plug)
Sqrt could be implemented in software if you look up a suitable algorithm.
xdalutzx
wrote
Jul 25 2010 at 8:45 AM
could u not just tell me how while were waiting for a manuel
kudzu
wrote
Jul 21 2010 at 2:35 PM
yes please. :) We also have plans for a plug scanner, tool, and generator... but Im still focused on MS5 right now...
smremde
wrote
Jul 21 2010 at 11:10 AM
We could really use a guide on how to do this. I'll consider writing one later unless someone else wants to.
Sign in to add a comment
Comment:
Work Item Details
Item #
11600
Status
Closed
Type
Issue
Impact
Low
Release
Unassigned
Assigned To
Unassigned
Component
No Component Selected
Reported On
Jul 20 2010 at 9:14 AM
Reported By
xdalutzx
Updated On
Apr 23 2011 at 11:25 AM
Updated By
Trivalik
Closed On
Apr 23 2011 at 11:25 AM
Closed By
Trivalik
n/a
Wiki Link
[workitem:11600]
Keyboard shortcuts
are available for this page.
Updating...
© 2006-2012 Microsoft
|
Get Help
|
Privacy Statement
|
Terms of Use
|
Code of Conduct
|
Advertise With Us
|
Version 2012.2.7.18398