math module makes confusing!
>>> import math >>> math.cos(math.pi/2) 6.123233995736766e-17 >>> math.acos(0) 1.5707963267948966 >>> math.pi/2 1.5707963267948966 As I learn cos(pi/2) = 0 that means acos(0) = pi/2 why cos(pi/2) = 6.123233995736766e-17
You could read up more in the python stuff on their documentationsfof each version. Search Python Documentation on Google
This actually *is* zero, with a floating-point accuracy! ;) https://en.m.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems
in advance,the PI representation is not real but it is also truncated with an appropriate accuracy and its half has less accuracy than in real.This is caused by mashine representation of decimal number(floating points operations).
Ahha! I got it @sayan chandra.
here is it...check the output against each line of code... https://code.sololearn.com/cI1NCJ9BwpBA/?ref=app
see this second verson of explaination @SENG THAI Red all the comments in code. https://code.sololearn.com/cCo62gBgC4kG/?ref=app
@sayan chandra Thanks! But Why it shows up as exponential value. It is because it can not show all the floating number after ".", isn't it?
of course.. exactly
somewhere anyway u have to end... cause this floating points hav no end.. like 10 divided by 3....
Please help, any idea?
Loop question, I've tried everything that I knew I just don't know. Please help me solve it out
What is wrong? Error on test.
Help me solve this (using loop)
Help me wiht python
how can i flip any word with c++