Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/arduino-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1
- uses: actions/checkout@v6
- uses: arduino/arduino-lint-action@v2
with:
library-manager: update
compliance: strict
3 changes: 1 addition & 2 deletions .github/workflows/arduino_test_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ jobs:
runTest:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/jsoncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ on:
paths:
- '**.json'
pull_request:
paths:
- '**.json'

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: json-syntax-check
uses: limitusus/json-syntax-check@v2
with:
Expand Down
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.3.3] - 2025-03-23
## [0.3.5] - 2026-01-15
- update GitHub actions
- minor edits

## [0.3.4] - 2025-03-23
- fix #28, prevent promotion of constants to double. Kudos to Harrison3000
- replace M_PI by a const float _PI_ to prevent promotion.
- update examples
- update readme.md (minor)
- minor edits


## [0.3.3] - 2023-11-02
- update readme.md
- update keywords.txt
Expand Down Expand Up @@ -102,17 +105,15 @@ is added, as it uses the same **isintable16\[\]** interpolation table.

There is no **atan()** or **atan2()** replacement.


## [0.1.4] - 2020-09-08
- rewrite itan()
- cleanup
- clean up
- examples

The library (0.1.4) provides an **itan()** which improved accuracy
upon the (0.1.3) version and performance for the ESP32.
Performance on AVR (UNO) is still an issue, accuracy is OK.


## [0.1.3] - 2020-09-07
- initial release.

Expand Down
2 changes: 1 addition & 1 deletion FastTrig.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: FastTrig.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.3.4
// VERSION: 0.3.5
// PURPOSE: Arduino library for a faster approximation of sin() and cos()
// DATE: 2011-08-18
// URL: https://github.com/RobTillaart/FastTrig
Expand Down
4 changes: 2 additions & 2 deletions FastTrig.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// FILE: FastTrig.h
// AUTHOR: Rob Tillaart
// VERSION: 0.3.4
// VERSION: 0.3.5
// PURPOSE: Arduino library for a faster approximation of sin() and cos()
// DATE: 2011-08-18
// URL: https://github.com/RobTillaart/FastTrig
Expand All @@ -18,7 +18,7 @@
#endif


#define FAST_TRIG_LIB_VERSION (F("0.3.4"))
#define FAST_TRIG_LIB_VERSION (F("0.3.5"))


#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2011-2025 Rob Tillaart
Copyright (c) 2011-2026 Rob Tillaart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ between **isin(int(x))** and **isin(int(x+1))**.
Of course this introduces an error but the error is small and performance is still
quite fast (which was the goal).

Feedback as always is welcome.


### Related

- https://github.com/RobTillaart/fastTrig
- https://github.com/RobTillaart/fast_math
- https://github.com/RobTillaart/printHelpers a.o. print floats in scientific notation
- https://github.com/RobTillaart?tab=repositories&q=math


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// FILE: fastTrig_atan_performance.ino
// AUTHOR: Rob Tillaart
// DATE: 2022-12-05
// PURPOSE: performance and accuracy measurement
// URL: https://github.com/RobTillaart/FastTrig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// AUTHOR: Rob Tillaart
// PURPOSE: generate look up tables for goniometry functions (and others)
// these are not optimized for interpolation.
// DATE: 2020-09-08
// URL: https://github.com/RobTillaart/FastTrig

// TODO
Expand All @@ -20,7 +19,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();

Expand Down
3 changes: 1 addition & 2 deletions examples/fastTrig_hypot_accuracy/fastTrig_hypot_accuracy.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// FILE: fastTrig_hypot_accuracy.ino
// AUTHOR: Rob Tillaart
// DATE: 2022-12-05
// PURPOSE: performance and accuracy measurement
// URL: https://github.com/RobTillaart/FastTrig

Expand All @@ -20,7 +19,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();
delay(10);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// FILE: fastTrig_hypot_performance.ino
// AUTHOR: Rob Tillaart
// DATE: 2022-12-05
// PURPOSE: performance and accuracy measurement
// URL: https://github.com/RobTillaart/FastTrig

Expand All @@ -20,7 +19,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();
delay(10);
Expand Down
3 changes: 1 addition & 2 deletions examples/fastTrig_isincos/fastTrig_isincos.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// FILE: isincos.ino
// AUTHOR: Rob Tillaart
// DATE: 2022-12-09
// PURPOSE: R&D
// URL: https://github.com/RobTillaart/FastTrig

Expand All @@ -20,7 +19,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();
delay(10);
Expand Down
3 changes: 1 addition & 2 deletions examples/fastTrig_isincos256/fastTrig_isincos256.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// FILE: fastTrig_isincos256.ino
// AUTHOR: Rob Tillaart
// DATE: 2022-12-09
// PURPOSE: R&D
// URL: https://github.com/RobTillaart/FastTrig

Expand All @@ -20,7 +19,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();
delay(10);
Expand Down
3 changes: 1 addition & 2 deletions examples/fastTrig_optimize/fastTrig_optimize.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// FILE: fastTrig_optimize.ino
// AUTHOR: Rob Tillaart
// PURPOSE: sketch to optimize the table for interpolation
// DATE: 2020-09-06
// URL: https://github.com/RobTillaart/FastTrig

// WARNING TAKES A LOT OF TIME ON 16 MHz
Expand All @@ -29,7 +28,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();

Expand Down
2 changes: 1 addition & 1 deletion examples/fastTrig_playground/fastTrig_playground.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// FILE: fastTrig_playground.ino
// AUTHOR: Rob Tillaart
// PURPOSE: playground to play with tables.
// DATE: 2020-09-08
// URL: https://github.com/RobTillaart/FastTrig

// NOTES
Expand Down Expand Up @@ -80,6 +79,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FastTrig");
Serial.println();

test_accuracy();
Expand Down
3 changes: 1 addition & 2 deletions examples/fastTrig_plot/fastTrig_plot.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// FILE: fastTrig_plot.ino
// AUTHOR: Rob Tillaart
// PURPOSE: testing the fastTrigonio functions
// DATE: 2020-09-07
// URL: https://github.com/RobTillaart/FastTrig

// sketch to visually compare tan(x) and itan(x)
Expand All @@ -22,7 +21,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();

Expand Down
4 changes: 1 addition & 3 deletions examples/fastTrig_test1/fastTrig_test1.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// FILE: fastTrig_test1.ino
// AUTHOR: Rob Tillaart
// PURPOSE: testing the fastTrigonio functions
// DATE: 2020-08-30
// (c) : MIT
// URL: https://github.com/RobTillaart/FastTrig


Expand All @@ -21,7 +19,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();

Expand Down
4 changes: 1 addition & 3 deletions examples/fastTrig_test2/fastTrig_test2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// FILE: fastTrig_test2.ino
// AUTHOR: Rob Tillaart
// PURPOSE: testing the itan functions
// DATE: 2021-08-10
// (c) : MIT
// URL: https://github.com/RobTillaart/FastTrig


Expand All @@ -21,7 +19,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();

Expand Down
3 changes: 1 addition & 2 deletions examples/fastTrig_test_arc/fastTrig_test_arc.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// AUTHOR: Rob Tillaart
// VERSION: 0.1.1
// PURPOSE: testing the fastTrigonio functions
// DATE: 2020-09-09
// URL: https://github.com/RobTillaart/FastTrig


Expand All @@ -22,7 +21,7 @@ void setup()
while (!Serial);
Serial.println();
Serial.println(__FILE__);
Serial.println("FAST_TRIG_LIB_VERSION: ");
Serial.print("FAST_TRIG_LIB_VERSION: ");
Serial.println(FAST_TRIG_LIB_VERSION);
Serial.println();

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/FastTrig"
},
"version": "0.3.4",
"version": "0.3.5",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=FastTrig
version=0.3.4
version=0.3.5
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library with interpolated lookup for sin(), cos(), tan(), atan2() and more.
Expand Down