Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMPP/trayallocationPP/   (Wiener Entwicklungsmethode ©)  Datei vom 13.4.2020 mit Größe 1 kB image not shown  

Quellcode-Bibliothek jatan2.pvs   Sprache: PVS

 
%------------------------------------------------------------------------------
% Java atan2  --> (-pi, pi)
%
% Java atan2(y,x) converts rectangular coordinates (x,y) to polar (r,?),
% where r is the distance from the origin and ? is the angle from the x-axis.
% The equation for determining atan2 is: tan? = y / x (where ? is the angle).
% The output values are in the range between -pi and pi
%------------------------------------------------------------------------------
jatan2: THEORY
BEGIN
 
    IMPORTING trig_values, trig_inverses,  atan2_props
  
    x,y: VAR real

    jatan2(y:real,x:{z:real|y=0 => z/=0}): real = IF y >= 0 THEN atan2(x,y)
                                                  ELSE atan2(x,y) - 2*pi
                                                  ENDIF


%%  TEST

    t1: LEMMA jatan2(1,1) = pi/4
    t2: LEMMA jatan2(-1,1) = -pi/4
    t3: LEMMA jatan2(1,-1) = 3*pi/4
    t4: LEMMA jatan2(-1,-1) = -3*pi/4

END jatan2


94%


¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.0Bemerkung:  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

sprechenden Kalenders