subsurface/subsurface-core
Linus Torvalds afadb6f05c gas model: use virial cubic polynomial form
The "virial" form of the Z compression factor is of the form

   Z = 1.0 + A*p + B*p^2 + C*p^3 + ..

and it's considered the "right" polynomial form to use.  It happens to
also make for one constant less per gas (since the 1.0 can be added
later), and can be used to simplify the expression and avoid a few
floating point operations.

However, in order for that kind of expression simplification to make
sense, we need to make sure that we don't calculate the powers of the
pressure multiple times either, and that means we have to inline all the
actual calculations.

Our compiler options still mean that the generated code isn't optimal,
but that's a separate issue. And it is a lot better than it used to be.

Being clever about this does potentially make the code a tiny bit less
legible, but maybe that's not too bad for something that we'd expect to
not ever touch once we get it right.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-04 10:18:07 -08:00
..
subsurface-qt Avoid dangling else warnings 2016-03-03 14:29:19 -08:00
android.cpp Android: go back to using Qt's DataLocation 2015-11-07 10:52:19 -08:00
checkcloudconnection.cpp Switch to compile time connect syntax 2015-12-01 15:34:00 -08:00
checkcloudconnection.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
cloudstorage.cpp Fix usage of QString 2016-01-26 09:51:14 -08:00
cloudstorage.h Fix usage of QString 2016-01-26 09:51:14 -08:00
CMakeLists.txt gas model: split up gas compressibility into a file of its own 2016-03-02 18:08:18 -08:00
cochran.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
cochran.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
color.cpp Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
color.h Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
configuredivecomputer.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
configuredivecomputer.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
configuredivecomputerthreads.cpp configure OSTC/OSTC3: Add safety stop parameters 2016-01-22 06:50:22 -08:00
configuredivecomputerthreads.h Remove unused headers 2016-01-22 06:50:06 -08:00
datatrak.c simple spelling changes 2015-11-15 12:10:37 -08:00
datatrak.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
deco.c Merge branch 'cmakeAndPreferences' 2015-11-02 19:54:34 -08:00
deco.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
device.c Add option to allocate the samples in fake_dc() 2016-02-20 09:36:14 -08:00
device.h Add option to allocate the samples in fake_dc() 2016-02-20 09:36:14 -08:00
devicedetails.cpp configure OSTC/OSTC3: Add safety stop parameters 2016-01-22 06:50:22 -08:00
devicedetails.h configure OSTC/OSTC3: Add safety stop parameters 2016-01-22 06:50:22 -08:00
display.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
dive.c gas model: split up gas compressibility into a file of its own 2016-03-02 18:08:18 -08:00
dive.h If salinity is not density, add density of fresh water 2016-02-28 15:39:52 +01:00
divecomputer.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divecomputer.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divelist.c Don't access undefined dive 2016-03-03 14:29:29 -08:00
divelist.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divelogexportlogic.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divelogexportlogic.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divesite.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divesite.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divesite.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divesitehelpers.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
divesitehelpers.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
equipment.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
exif.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
exif.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
file.c Don't just keep going when opening a git URL fails 2016-02-10 21:03:52 -08:00
file.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
gas-model.c gas model: use virial cubic polynomial form 2016-03-04 10:18:07 -08:00
gaspressures.c pressure interpolation: incrementally update interpolation data 2016-02-21 16:36:10 -08:00
gaspressures.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
gettext.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
gettextfromc.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
gettextfromc.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
git-access.c Don't connect to remote if git_local_only is set 2016-02-12 22:01:20 -08:00
git-access.h Cloud storage: check the top commit without loading dives 2015-12-27 10:06:33 -08:00
gpslocation.cpp Avoid precision loss on GPS fixes 2016-01-22 06:41:43 -08:00
gpslocation.h Random whitespace cleanup 2016-01-11 06:14:45 -08:00
helpers.h Don't use "get_volume_string()" for cylinder size string 2016-02-25 00:58:09 +01:00
imagedownloader.cpp If all else fails try loading images from cloud server 2016-01-10 14:12:36 -08:00
imagedownloader.h If all else fails try loading images from cloud server 2016-01-10 14:12:36 -08:00
isocialnetworkintegration.cpp Removed unused files 2015-11-09 18:00:56 -08:00
isocialnetworkintegration.h Remove the PluginSystem 2015-11-09 18:00:56 -08:00
libdivecomputer.c Only warn about different number of tanks and gases if there are tanks 2015-12-06 09:40:21 -08:00
libdivecomputer.h libdivecomputer.h: fix warning with DC_VERSION on Win32 2015-11-18 19:24:21 -08:00
linux.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
liquivision.c Fix Liquivision import crash 2016-02-03 06:06:23 -08:00
load-git.c Mark CCR dive's divetype properly 2016-01-31 13:06:39 -08:00
macos.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
membuffer.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
membuffer.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
metrics.cpp Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
metrics.h Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
ostctools.c simple spelling changes 2015-11-15 12:10:37 -08:00
parse-xml.c Mark CCR dive's divetype properly 2016-01-31 13:06:39 -08:00
planner.c Only close html tags if they were opened before 2015-11-24 09:20:40 -08:00
planner.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
pluginmanager.cpp Make it possible to connect to facebook again 2015-11-08 09:44:40 -08:00
pluginmanager.h Remove empty implementations 2015-11-09 18:00:56 -08:00
pref.h Language Settings Wrapper 2016-01-24 21:26:45 -08:00
prefs-macros.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
profile.c Do not run the deco calculations in the mobile app 2016-02-05 20:45:18 -08:00
profile.h Silence compiler warnings 2016-02-01 18:01:05 -08:00
qt-gui.h Missing half of the previous commit 2015-11-14 10:43:37 -08:00
qt-init.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
qthelper.cpp Don't use "get_volume_string()" for cylinder size string 2016-02-25 00:58:09 +01:00
qthelper.h Simplify image hashing logic 2016-01-10 14:12:23 -08:00
qthelperfromc.h Remove the non-canonical Subusrface version 2015-12-20 07:59:50 -08:00
qtserialbluetooth.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
save-git.c Remove the non-canonical Subusrface version 2015-12-20 07:59:50 -08:00
save-html.c Support for imperial depth on worldmap export 2016-01-10 14:13:58 -08:00
save-html.h Support for imperial depth on worldmap export 2016-01-10 14:13:58 -08:00
save-xml.c Interpret - as STDOUT on writing xml files 2015-11-24 09:20:03 -08:00
serial_ftdi.c ftdi: fix memory leak on error 2015-12-27 21:31:13 -08:00
sha1.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
sha1.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
statistics.c Fix crash with empty (or very short) dive list 2016-01-18 11:45:25 -08:00
statistics.h Add dive type to statistics window 2016-01-18 09:34:54 -08:00
strndup.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
strtod.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
subsurfacestartup.c subsurfacestartup.c: leave free_prefs() empty 2015-11-15 10:29:36 -08:00
subsurfacestartup.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
subsurfacesysinfo.cpp Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
subsurfacesysinfo.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
taxonomy.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
taxonomy.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
time.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
uemis-downloader.c Uemis downloader: handle yet another corner case 2015-12-06 13:38:38 -08:00
uemis.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
uemis.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
units.h Make it compile 2016-01-24 21:27:05 -08:00
version.c Remove the non-canonical Subusrface version 2015-12-20 07:59:50 -08:00
version.h Remove the non-canonical Subusrface version 2015-12-20 07:59:50 -08:00
webservice.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
windows.c Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
windowtitleupdate.cpp Don't crash if we have no WindowTitleUpdater registered 2015-11-07 09:53:17 -08:00
windowtitleupdate.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
worldmap-options.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00
worldmap-save.c Support for imperial depth on worldmap export 2016-01-10 14:13:58 -08:00
worldmap-save.h Move all core-functionality to subsurface-core 2015-10-30 10:36:48 -07:00