Truly independent web browser
Find a file
Ben Wiederhake bc5d5bf75d LibC: Implement new strtod, accurate up to 8 eps
This strtod implementation is not perfectly accurate, as evidenced by the test
(accuracy_strtod.cpp), but it is sufficiently close (up to 8 eps).

The main sources of inaccuracy are:
- Highly repeated division/multiplication by 'base'
  (Each operation brings a multiplicative error of 1+2^-53.)
- Loss during the initial conversion from long long to double (most prominently,
  69294956446009195 should first be rounded to 69294956446009200 and then
  converted to 69294956446009200.0 and then divided by ten, yielding
  6929495644600920.0. Currently, it converts first to double, can't represent
  69294956446009195.0, and instead represents 69294956446009190, which
  eventually yields 6929495644600919.0. Close, but technically wrong.)

I believe that these issues can be fixed by rewriting the part at and after
    double value = digits.number();
and that the loss before that is acceptable.

Specifically, losing the exact exponent on overflow is obviously fine.
The only other loss occurs when the significant digits overflow a 'long long'.
But these store 64(-7ish) bits, and the mantissa of a double only stores 52 bits.
With a bit more thinking, one could probably get the error down to 1 or 2 eps.
(But not better.)

Fixes #1979.
2020-05-11 10:52:24 +02:00
.github Meta: Add GitHub Sponsors to funding options 2019-11-02 23:32:34 +01:00
AK AK: Add String::trim_spaces() 2020-05-11 10:48:54 +02:00
Applications LibProtocol: Pass response headers in a case insensitive HashMap 2020-05-10 22:32:12 +02:00
Base FontEditor: Fix link to icon after it moved 2020-05-11 09:29:30 +02:00
Demos LibGfx: Add support for dashed lines 2020-05-10 19:41:00 +02:00
DevTools Meta: Add script to enforce license headers & run it on Travis 2020-05-09 23:55:58 +02:00
Documentation Services: Renamed from Servers 2020-05-08 21:57:44 +02:00
Games LibGUI: Make it easier to create checkable GUI::Actions 2020-04-21 17:21:28 +02:00
Kernel Ports: Add preliminary dropbear port 2020-05-11 09:50:42 +02:00
Libraries LibC: Implement new strtod, accurate up to 8 eps 2020-05-11 10:52:24 +02:00
MenuApplets Meta: Fix Makefile permissions (not executable) 2020-05-03 14:24:08 +02:00
Meta Meta: Add script to enforce license headers & run it on Travis 2020-05-09 23:55:58 +02:00
Ports Ports: Add preliminary dropbear port 2020-05-11 09:50:42 +02:00
Services WindowServer: Shade the bottom of the menu bar like a button 2020-05-10 22:32:12 +02:00
Shell Shell: Hyperlink output from "pwd" and "dirs" built-ins :^) 2020-05-10 16:24:59 +02:00
Tests LibC: Demonstrate strtod inaccuracy 2020-05-11 10:52:24 +02:00
Toolchain Travis: Fix Cache spam 2020-05-11 10:27:19 +02:00
Userland ls: Emit hyperlinks for files outside the current directory 2020-05-10 17:48:41 +02:00
.clang-format Meta: Update .clang-format to not indent nested namespaces 2020-03-14 10:10:21 +01:00
.gitignore Meta: Add Lagom CMake dir to .gitignore 2020-04-13 23:15:05 +02:00
.travis.yml Meta: Add script to enforce license headers & run it on Travis 2020-05-09 23:55:58 +02:00
CODE_OF_CONDUCT.md Meta: Move code of conduct (lol) to a separate file 2019-10-23 10:05:06 +02:00
CONTRIBUTING.md Meta: Add a basic "issue policy" to CONTRIBUTING.md 2020-05-04 13:49:15 +02:00
INSTALL.md Meta: Update link to build instructions in INSTALL.md 2020-01-01 17:33:32 +01:00
LICENSE Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Makefile Services: Renamed from Servers 2020-05-08 21:57:44 +02:00
Makefile.common Services: Renamed from Servers 2020-05-08 21:57:44 +02:00
Makefile.subdir Build: wrap make invocations with flock(1) 2019-12-28 21:09:33 +01:00
ReadMe.md Meta: Update ReadMe a bit, add link to issue policy 2020-05-09 09:51:12 +02:00

SerenityOS

Graphical Unix-like operating system for x86 computers.

Travis CI status

About

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

Roughly speaking, the goal is a marriage between the aesthetic of late-1990s productivity software and the power-user accessibility of late-2000s *nix. This is a system by us, for us, based on the things we like.

I (Andreas) regularly post raw hacking sessions and demos on my YouTube channel.

Sometimes I write about the system on my github.io blog.

I'm also on Patreon and GitHub Sponsors if you would like to show some support that way.

Screenshot

Screenshot as of 1133aca

Kernel features

  • x86 (32-bit) kernel with pre-emptive multi-threading
  • Hardware protections (SMEP, SMAP, UMIP, NX, WP, TSD, ...)
  • IPv4 stack with ARP, TCP, UDP and ICMP protocols
  • ext2 filesystem
  • POSIX signals
  • Purgeable memory
  • /proc filesystem
  • Pseudoterminals (with /dev/pts filesystem)
  • Filesystem notifications
  • CPU and memory profiling
  • SoundBlaster 16 driver
  • VMWare/QEMU mouse integration

System services

  • Launch/session daemon (SystemServer)
  • Compositing window server (WindowServer)
  • Text console manager (TTYServer)
  • DNS client (LookupServer)
  • Network protocols server (ProtocolServer)
  • Software-mixing sound daemon (AudioServer)
  • Desktop notifications (NotificationServer)
  • HTTP server (WebServer)
  • Telnet server (TelnetServer)
  • DHCP client (DHCPClient)

Libraries

  • C++ templates and containers (AK)
  • Event loop and utilities (LibCore)
  • 2D graphics library (LibGfx)
  • GUI toolkit (LibGUI)
  • Cross-process communication library (LibIPC)
  • HTML/CSS engine (LibWeb)
  • JavaScript engine (LibJS)
  • Markdown (LibMarkdown)
  • Audio (LibAudio)
  • PCI database (LibPCIDB)
  • Terminal emulation (LibVT)
  • Out-of-process network protocol I/O (LibProtocol)
  • Mathematical functions (LibM)
  • ELF file handing (LibELF)
  • POSIX threading (LibPthread)
  • Higher-level threading (LibThread)
  • Transport Layer Security (LibTLS)
  • HTTP and HTTPS (LibHTTP)

Userland features

  • Unix-like libc and userland
  • Shell with pipes and I/O redirection
  • On-line help system (both terminal and GUI variants)
  • Web browser (Browser)
  • C++ IDE (HackStudio)
  • IRC client
  • Desktop synthesizer (Piano)
  • Various desktop apps & games
  • Color themes

How do I build and run this?

See the SerenityOS build instructions

Before opening an issue

Please see the issue policy.

Wanna chat?

Come hang out with us in #serenityos on the Freenode IRC network.

Author

Contributors

(And many more!) Feel free to append yourself here if you've made some sweet contributions. :)

License

SerenityOS is licensed under a 2-clause BSD license.