python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Decimal.js sin() function returns incorrect result
I have a javascript program that looks like this:
function dosine(){
var num = new Decimal(document.getElementById('num').value);
if(document.getElementById('degrad').value == "degrees&qu...
CoderMan
Votes: 0
Answers: 1
pi finding algorithm works for first few iterations then starts returning 0
I've written an algorithm to find pi by inscribing a square within a circle of diameter 1 so that the diagonal bisector of the square is of length 1. This gives me 4 right angle triangles with side le...
crispy
Votes: 0
Answers: 1
Trigonometry solving in python
The question is:
How do I verify that sin^2(x) + cos^2(x) = 1 for π₯=π,π/2,π/4,π/6?
I have no idea on how to approach this problem
Please Help!
Any help would be greatly appreciated
Direwolf
Votes: 0
Answers: 1
Converting from degrees to radians and back leaves a very small leftover
So I have the following javascript code:
function dosine(){
var num = document.getElementById('num').value;
console.log(num);
num = (num*Math.PI)/180;
num = Math.sin(num);
numinver...
CoderMan
Votes: 0
Answers: 1