Skip to content

Commit

Permalink
update some dates and versions
Browse files Browse the repository at this point in the history
* make clear that this is not JSOFA!
* make TSOFA follow semantic version numbering like the original IAU SOFA
  • Loading branch information
pahjbo committed Jan 8, 2024
1 parent dcf4a0e commit f7334b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Binary file modified LICENSE.txt
Binary file not shown.
16 changes: 8 additions & 8 deletions src/main/ts/TSOFA.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { TSOFAIllegalParameter } from "./TSOFAIllegalParameter";
import { TSOFAInternalError } from "./TSOFAInternalError";
/**
* Java implementation of Standards of Fundamental Astronomy. <a href="http://www.iausofa.org/">http://www.iausofa.org/</a>
* Typescript implementation of Standards of Fundamental Astronomy. <a href="http://www.iausofa.org/">http://www.iausofa.org/</a>
*
* This code has been created by hand translating the official C version.
* This code has been created by hand translating from JSOFA.
*
* @author Paul Harrison ([email protected]) 02 Apr 2014
* @version TSOFA Release 20180130
* @since 26 Jan 2010
* @author Paul Harrison ([email protected]) 08 Jan 2024
* @version TSOFA Release 18
* @since 8 Jan 2024
* @class
*/
export class TSOFA {
Expand All @@ -22,7 +22,7 @@
/**
* TSOFA release {@value}
*/
public static TSOFA_RELEASE: string = "20210512b";
public static TSOFA_RELEASE: string = "18";

/**
* tracked IAU SOFA revision {@value}.
Expand All @@ -32,7 +32,7 @@
/**
* Release year for this version of jauDat {@value}
*/
public static IYV: number = 2021;
public static IYV: number = 2023;

/**
* The latest confirmed omission of a leap second form IERS
Expand Down Expand Up @@ -179,7 +179,7 @@

static TANGENT_TINY: number = 1.0E-6;

static DBL_EPSILON: number; public static DBL_EPSILON_$LI$(): number { TSOFA.__static_initialize(); if (TSOFA.DBL_EPSILON == null) { TSOFA.DBL_EPSILON = /* ulp */((x) => { let buffer = new ArrayBuffer(8); let dataView = new DataView(buffer); dataView.setFloat64(0, x); let first = dataView.getUint32(0); let second = dataView.getUint32(4); let rawExponent = first & 0x7ff00000; if (rawExponent == 0x7ff00000) { dataView.setUint32(0,first & 0x7fffffff); } else if (rawExponent == 0) { dataView.setUint32(4,1); dataView.setUint32(0,0); } else if (rawExponent >= (52 << 20) + 0x00100000) { dataView.setUint32(0,rawExponent - (52 << 20)); dataView.setUint32(4,0); } else if (rawExponent >= (33 << 20)) { dataView.setUint32(0,1 << ((rawExponent - (33 << 20)) >>> 20 )); dataView.setUint32(4,0); } else { dataView.setUint32(4,1 << ((rawExponent - 0x00100000) >>> 20)); dataView.setUint32(0,0); } return dataView.getFloat64(0); })(1.0); } return TSOFA.DBL_EPSILON; }
static DBL_EPSILON: number; public static DBL_EPSILON_$LI$(): number { TSOFA.__static_initialize(); if (TSOFA.DBL_EPSILON == null) { TSOFA.DBL_EPSILON = /* ulp */((x) => { const buffer = new ArrayBuffer(8); const dataView = new DataView(buffer); dataView.setFloat64(0, x); let first = dataView.getUint32(0); let second = dataView.getUint32(4); let rawExponent = first & 0x7ff00000; if (rawExponent == 0x7ff00000) { dataView.setUint32(0,first & 0x7fffffff); } else if (rawExponent == 0) { dataView.setUint32(4,1); dataView.setUint32(0,0); } else if (rawExponent >= (52 << 20) + 0x00100000) { dataView.setUint32(0,rawExponent - (52 << 20)); dataView.setUint32(4,0); } else if (rawExponent >= (33 << 20)) { dataView.setUint32(0,1 << ((rawExponent - (33 << 20)) >>> 20 )); dataView.setUint32(4,0); } else { dataView.setUint32(4,1 << ((rawExponent - 0x00100000) >>> 20)); dataView.setUint32(0,0); } return dataView.getFloat64(0); })(1.0); } return TSOFA.DBL_EPSILON; }

/**
* dint(A) - truncate to nearest whole number towards zero (double)
Expand Down

0 comments on commit f7334b9

Please sign in to comment.