
CommunityNews
Integer Math in JavaScript
Integer math in JavaScript | James Darpinian.
You may know that all numbers in JavaScript are 64 bit double-precision floating point values. This is sometimes convenient and it works pretty well as a default for novice programmers, who are often confused by integer math, and rightfully so when 1 / 2 = 0. Unfortunately, it makes things slow. Doubles take a lot of memory and floating point math is slower than integer math on CPUs. It’s also inconvenient if you want to port existing code to JavaScript, because existing code usually expects to use integer math.
Read in full here:
This thread was posted by one of our members via one of our news source trackers.
Popular Frontend topics

Building LightOS with React Native.
The Light Phone 2 is a minimalist cellphone that was named one of Time Magazine’s best inventions of...
New

GitHub - eeue56/derw: An Elm-inspired language that transpiles to TypeScript.
An Elm-inspired language that transpiles to TypeScript - G...
New

Javascript Does Not Need a StringBuilder.
Today I learned that Javascript does not need a StringBuilder for accumulating a large number ...
New

Building a JavaScript Bundler.
Learn the basics of building a JavaScript bundler.
New

WebAssembly (wasm) allows code written in languages other than JavaScript to run on browsers. If you haven’t been paying attention, all t...
New

JavaScript Containers.
The majority of server programs are Linux programs. They consist of a file system, some executable files, maybe s...
New

TIL: You Can Access A User’s Camera with Just HTML.
So that’s the HTML capture attribute. It’s a pretty cool way to add a nicer user exp...
New

Type-Level TypeScript — Introduction.
A course to take your TypeScript skills to the next level!
New

A Game Engine in the Elm Style!.
A ‘Nu’ way to make games! The Nu Game Engine was the world’s first practical, purely-functional game en...
New

Speeding up the JavaScript ecosystem - one library at a time.
Most popular libraries can be sped up by avoiding unnecessary type convers...
New
Other popular topics

Reading something? Working on something? Planning something? Changing jobs even!?
If you’re up for sharing, please let us know what you’...
New

I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl:
The Ser...
New

Small essay with thoughts on macOS vs. Linux:
I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New

Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New

Seems like a lot of people caught it - just wondered whether any of you did?
As far as I know I didn’t, but it wouldn’t surprise me if I...
New

A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New

Author Spotlight
Rebecca Skinner
@RebeccaSkinner
Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New

Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New

Author Spotlight:
Bruce Tate
@redrapids
Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New

Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /typescript
- /svelte
- /crystal
- /kotlin
- /c-plus-plus
- /tailwind
- /gleam
- /react
- /ocaml
- /elm
- /flutter
- /vscode
- /ash
- /html
- /opensuse
- /centos
- /php
- /deepseek
- /zig
- /scala
- /sublime-text
- /textmate
- /lisp
- /nixos
- /debian
- /react-native
- /agda
- /kubuntu
- /arch-linux
- /django
- /revery
- /ubuntu
- /spring
- /manjaro
- /nodejs
- /diversity
- /lua
- /julia
- /c
- /slackware
- /neovim