Comments (3)
Thank you for your interest in Corman Lisp!
I have replied to you in the Google Group. Unfortunately, we do not have an active mailing list or forum yet.
May I ask you to provide some code which demonstrates the problem? It would simplify the investigation.
from cormanlisp.
Sure thing. This code loops around a unit circle from 0° to 360° in 15° steps. The last two numbers show the starting angle, and the reconstructed angle using atan
. This is run on v3.1.2
(loop for ang from 0 to (* 2 pi) by (/ pi 12)
for deg = (round (* ang (/ 180 pi)))
for x = (cos ang)
and y = (sin ang)
for atan-ang = (atan y x)
for atan-deg = (round (* atan-ang (/ 180 pi)))
do (format t "~&Ang = ~,3Fr pt = (~5,2F, ~5,2F) start deg = ~3D, atan = ~3D~%" ang x y deg atan-deg))
Ang = 0.000r pt = ( 1.00, 0.00) start deg = 0, atan = 0
Ang = 0.262r pt = ( 0.97, 0.26) start deg = 15, atan = 15
Ang = 0.524r pt = ( 0.87, 0.50) start deg = 30, atan = 30
Ang = 0.785r pt = ( 0.71, 0.71) start deg = 45, atan = 45
Ang = 1.047r pt = ( 0.50, 0.87) start deg = 60, atan = 60
Ang = 1.309r pt = ( 0.26, 0.97) start deg = 75, atan = 75
Ang = 1.571r pt = ( 0.00, 1.00) start deg = 90, atan = 90
Ang = 1.833r pt = (-0.26, 0.97) start deg = 105, atan = -75
Ang = 2.094r pt = (-0.50, 0.87) start deg = 120, atan = -60
Ang = 2.356r pt = (-0.71, 0.71) start deg = 135, atan = -45
Ang = 2.618r pt = (-0.87, 0.50) start deg = 150, atan = -30
Ang = 2.880r pt = (-0.97, 0.26) start deg = 165, atan = -15
Ang = 3.142r pt = (-1.00, -0.00) start deg = 180, atan = 0
Ang = 3.403r pt = (-0.97, -0.26) start deg = 195, atan = 15
Ang = 3.665r pt = (-0.87, -0.50) start deg = 210, atan = 30
Ang = 3.927r pt = (-0.71, -0.71) start deg = 225, atan = 45
Ang = 4.189r pt = (-0.50, -0.87) start deg = 240, atan = 60
Ang = 4.451r pt = (-0.26, -0.97) start deg = 255, atan = 75
Ang = 4.712r pt = (-0.00, -1.00) start deg = 270, atan = 90
Ang = 4.974r pt = ( 0.26, -0.97) start deg = 285, atan = -75
Ang = 5.236r pt = ( 0.50, -0.87) start deg = 300, atan = -60
Ang = 5.498r pt = ( 0.71, -0.71) start deg = 315, atan = -45
Ang = 5.760r pt = ( 0.87, -0.50) start deg = 330, atan = -30
Ang = 6.021r pt = ( 0.97, -0.26) start deg = 345, atan = -15
Ang = 6.283r pt = ( 1.00, -0.00) start deg = 360, atan = 0
NIL
The existing atan only works in the first quadrant (and fourth quadrant I suppose), and I think needs updating like in my diff. In developing the suggested code, I generated output and compared it to other calculations, like Excel's atan2. I found that if I wasn't careful, I got an inconsistent shape of the atan graph.
from cormanlisp.
Thanks, that is a good catch. With your fix Corman Lisp produces the same results as SBCL.
from cormanlisp.
Related Issues (20)
- *print-case* :capitalize does not capitalize printed values HOT 3
- The Format function's F directive's k parameter fails when preceded only by a tilde and 2 commas HOT 2
- The Format function's $ directive only displays one 0 after the decimal when default is two HOT 3
- Do not change lineendings when editing files using Corman Lisp IDE
- Consider static linking of Visual C++ runtime to the executables HOT 24
- Using keyword symbols as slot-descriptors in DEFSTRUCT
- Error when trying to create STANDARD-METHOD instances. HOT 2
- Missing file clos-tests.lisp HOT 4
- DLL compiled in "debug"? HOT 5
- sampledll causes an error when client.exe exits HOT 4
- Quicklisp HOT 4
- Implement conventional command line switches (-eval, -norc, etc) HOT 1
- load-image fails: push-module-directory undefined HOT 1
- retarget corman common lisp to GCC (GNU compiler collection) HOT 1
- Corman Lisp running on M1-based Mac (via Windows for ARM) HOT 4
- Is there a Windows binary I can download? I don't need the source code HOT 2
- Can we interface with C#? HOT 1
- Is this project still being worked on? HOT 2
- Cannot start; a window flickers then disappears
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cormanlisp.