並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 39 件 / 39件

新着順 人気順

multiply javaの検索結果1 - 39 件 / 39件

  • 浮動小数点型の算術とお近づきになりたい人向けの記事 - えびちゃんの日記

    お近づきになりたい人向けシリーズです。 いろいろなトピックを詰め込みましたが、「これら全部を知らないといけない」のようなつもりではなく、いろいろなことを知るきっかけになったらいいなという気持ちなので、あまり身構えずにちょっとずつ読んでもらえたらうれしい気がします。 まえがき 予備知識 規格 用語 精度という語について 記法 表現について 有限値の表現について エンコードについて 丸めについて よくある誤差や勘違いの例 0.1 = 1 / 10? 0.1 + 0.2 = 0.3? 整数の誤差 Rump’s Example 基本的な誤差評価 用語に関して 実数の丸め 有理数の丸め 基本演算の丸め 差について 複数回の演算 補題たち 桁落ちについて Re: Rump’s example 融合積和 数学関数に関する式の計算 誤差の削減に関して 総和計算 数学関数の精度について 比較演算について 雑

      浮動小数点型の算術とお近づきになりたい人向けの記事 - えびちゃんの日記
    • 関数名、メソッド名、変数名でよく使う英単語のまとめ

      プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

        関数名、メソッド名、変数名でよく使う英単語のまとめ
      • JavaScriptのデザインパターンについて

        どうもoreoです。 今回はモダンなJavaScript開発環境で役立つデザインパターンを紹介します。 この記事は、JavaScript Patterns WorkshopとPatterns.devを参考にしています。 有名な「Java言語で学ぶデザインパターン入門」などでは、古典的な23個のデザインパターンが紹介されていますが、JavaScript Patterns WorkshopではPatterns.devをベースとして、モダンなJavaScriptにおける6つのデザインパターンについて言及されています。この記事ではそれらについてまとめてみたいと思います! ※本記事中のコードは、JavaScript Patterns WorkshopとPatterns.devから引用させていただいております。 1 Design Patternsとは? デザインパターンとは、ソフトウェア開発で繰り返し

          JavaScriptのデザインパターンについて
        • Go: A Documentary

          The historical release notes may helpful for general information: doc/go1release Go Release History doc/go1prerelease Pre-Go 1 Release History doc/go0release Weekly Release History (Before Go 1) Language Design General design/go0initial Rob Pike, Robert Griesemer, Ken Thompson. The Go Annotated Specification. Mar 3, 2008. design/go0spec0 The Go Programming Language. Language Specification. Mar 7,

          • Hacking the JavaScript Lottery

            January 2016 boasted a Powerball jackpot of 1.5 billion dollars. This generated a lot of interest in the lottery and the Los Angeles Times released a simulator where you start with 100 dollars and play until that is gone. I had seen previous work for predicting Java’s Math.random() and thought it would be a fun project to replicate for the browser. The first step is to find the algorithm used in t

              Hacking the JavaScript Lottery
            • Pragmatic Functional Programming in TypeScript

              Previous slideNext slideToggle fullscreenOpen presenter view Pragmatic Functional Programming in TypeScript Yuichi Goto | TSKaigi 2025 on May 24, 2025 発表者について Yuichi Goto @yasaichi パーフェクトRuby on Rails共著者 株式会社EARTHBRAIN [PR] EARTHBRAINとプロダクトについて 2021年7月創業のテクノロジースタートアップ 建設生産プロセスの生産性・安全性の向上を実現するデジタル ソリューション「Smart Construction®」を開発・保守 相互連携する複数のソフトウェア・ハードウェアの形で提供 プロダクトの一部は世界20カ国以上で利用 本セッションについて 関数型プログラ

                Pragmatic Functional Programming in TypeScript
              • Rewriting the Ruby parser

                At Shopify, we have spent the last year writing a new Ruby parser, which we’ve called YARP (Yet Another Ruby Parser). As of the date of this post, YARP can parse a semantically equivalent syntax tree to Ruby 3.3 on every Ruby file in Shopify’s main codebase, GitHub’s main codebase, CRuby, and the 100 most popular gems downloaded from rubygems.org. We recently got approval to merge this work into C

                  Rewriting the Ruby parser
                • Python 3.13 gets a JIT

                  Happy New Year everyone! In late December 2023 (Christmas Day to be precise), CPython core developer Brandt Bucher submitted a little pull-request to the Python 3.13 branch adding a JIT compiler. This change, once accepted would be one of the biggest changes to the CPython Interpreter since the Specializing Adaptive Interpreter added in Python 3.11 (which was also from Brandt along with Mark Shann

                    Python 3.13 gets a JIT
                  • タッパーの自己言及式の謎を解く - プログラミングの備忘録

                    こんにちは。 今回は「タッパーの自己言及式 (Tupper's self-referential formula)」を取りあげようと思います。 (記事タイトルを AI が生成してくれるようになったので、さっそく使ってみました。) 例のごとく、少し前にこんなツイートを見かけました。 Tupper's self-referential formula is a formula that visually represents itself when graphed at a specific location in the (x, y) plane. pic.twitter.com/QVxB3fozpe— Fermat's Library (@fermatslibrary) 2022年10月14日 (Fermat's Library は理系的な雑学のツイートが多く、知見が広がるのでよく見ていま

                      タッパーの自己言及式の謎を解く - プログラミングの備忘録
                    • AST vs. Bytecode: Interpreters in the Age of Meta-Compilation

                      233 AST vs. Bytecode: Interpreters in the Age of Meta-Compilation OCTAVE LAROSE, University of Kent, UK SOPHIE KALEBA, University of Kent, UK HUMPHREY BURCHELL, University of Kent, UK STEFAN MARR, University of Kent, UK Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interprete

                      • 人知れず消えていったマイナーCPUを語ろう(第6回):Arm Cortex-Mの前に敗れ去った「Atmel AVR32」 | テクノエッジ TechnoEdge

                        猫に傅くために原稿を書いて日銭を稼いでいる毎日。元は組み込み系のエンジニアだったのに、もうずいぶん遠い所まで来てしまった。 コンピュータの歴史を暗部も含めてていねいに掘り起こすことで定評のある大原雄介さんによる連載6回目。8bit版は残ったのに32bit版は消えてしまった、不運なAtmel AVR32の生い立ちとその結末について。 Atmelという会社とAVR(AVR8)というRISCプロセッサの話は以前こちらで書いた(*1)。今回の話はこれに続くものである。 *1:ついこの前書いたような気がしていたが、既に3年前の記事だった Atmelという会社は1984年に創業された。社名は"Advanced Technology for MEmory and Logic"に由来する。創業者は元々はIntelでEEPROMの開発に携わり、次いでEEPROM専業メーカーであるSEEQ Technolog

                          人知れず消えていったマイナーCPUを語ろう(第6回):Arm Cortex-Mの前に敗れ去った「Atmel AVR32」 | テクノエッジ TechnoEdge
                        • The Absolute Minimum Every Software Developer Must Know About Unicode in 2023 (Still No Excuses!) @ tonsky.me

                          If you combine this with the Unicode table, you’ll see that English is encoded with 1 byte, Cyrillic, Latin European languages, Hebrew and Arabic need 2, and Chinese, Japanese, Korean, other Asian languages, and Emoji need 3 or 4. A few important points here: First, UTF-8 is byte-compatible with ASCII. The code points 0..127, the former ASCII, are encoded with one byte, and it’s the same exact byt

                            The Absolute Minimum Every Software Developer Must Know About Unicode in 2023 (Still No Excuses!) @ tonsky.me
                          • GoのModel Context Protocol (MCP)の開発フレームワークmcp-goを使ってみる

                            Model Context Protocol (MCP) 概要 MCPは、Claudeの開発元であるAnthropicによりLLMとローカル環境を接続するための標準プロトコル この規格で実装されたMCPサーバーを使うことで、LLMにローカルファイルの読み取りやAPIへのアクセスなどの機能を拡張できる JSON-RPC の仕様が規格化されているだけなので、様々なプログラミング言語で実装可能 Claude DesktopやCursor、Clineなどでは既にMCPサーバーの利用がサポートされている 仕様(Draft)はこちら GoのMCP開発ライブラリ Python, TypeScript, Java, Kotlin は公式からSDKが提供されていますが、(2025-03-21時点) Goでライブラリを使ってMCPサーバーを実装する場合は、自前で実装するか、サードパーティライブラリに頼ることに

                              GoのModel Context Protocol (MCP)の開発フレームワークmcp-goを使ってみる
                            • AI Flame Graphs

                              Recent posts: 05 Dec 2025 » Leaving Intel 28 Nov 2025 » On "AI Brendans" or "Virtual Brendans" 22 Nov 2025 » Intel is listening, don't waste your shot 17 Nov 2025 » Third Stage Engineering 04 Aug 2025 » When to Hire a Computer Performance Engineering Team (2025) part 1 of 2 22 May 2025 » 3 Years of Extremely Remote Work 01 May 2025 » Doom GPU Flame Graphs 29 Oct 2024 » AI Flame Graphs 22 Jul 2024

                              • 0.10.0 Release Notes ⚡ The Zig Programming Language

                                Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                                • ソフトウェアの設計原則②コマンド・クエリ分離の原則(CQS) | 楽水

                                  ソフトウェアの設計原則①:SOLIDの原則という記事で、変化に強いソフトウェアの代表的な特徴として以下をあげ、それを実現する、ソフトウェアの設計原則の一つ、SOLIDについて解説しました。 保守性が高いこと 修正箇所が局所化され、他の部分に影響しないこと(リスクの局所化)。 再利用性が高いこと ソフトウェアが部品化され、それを再利用することができる。 拡張性が高いこと ソフトウェアを構成する要素同士を疎結合することで、ソフトウェアを様々な実装で拡張することができる。 今回は、プログラミングにおける副作用を最小限に抑えることで保守性と再利用性を確保するための設計原則、コマンド・クエリ分離の原則(Command/Query Separation:CQS)について以下の観点で解説します。 プログラミングにおける副作用とは コマンド・クエリ分離の原則(CQS)とは コマンド・クエリ責務分離(CQR

                                  • Gemini に「オブジェクト指向の継承を使わずにポリモーフィズムする方法」を訊いてみた - Qiita

                                    Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 継承なしポリモーフィズムの実装方法 近年、オブジェクト指向プログラミング、特に「継承」の利用について慎重な意見を見かける機会が増えました。 継承は「階層的な事物の分類」や「ポリモーフィズム(多態性)」を実現する強力な機能ですが、同時にコードの結合度を高め、変更を困難にする要因としても指摘されています。 もし継承の使用を控えるとしたら、私たちは代わりにどのような手法で柔軟な設計を実現すればよいのでしょうか。 本記事では、Gemini との対話形式で、継承や従来のオブジェクト指向に依存しない、よりモダンで柔軟なプログラミング手法について探っ

                                      Gemini に「オブジェクト指向の継承を使わずにポリモーフィズムする方法」を訊いてみた - Qiita
                                    • research!rsc: Floating-Point Printing and Parsing Can Be Simple And Fast (Floating Point Formatting, Part 3)

                                      Introduction A floating point number f has the form f=m·2e where m is called the mantissa and e is a signed integer exponent. We like to read numbers scaled by powers of ten, not two, so computers need algorithms to convert binary floating-point to and from decimal text. My 2011 post “Floating Point to Decimal Conversion is Easy” argued that these conversions can be simple as long as you don’t car

                                      • Secure Randomness in Go 1.22 - The Go Programming Language

                                        Computers aren’t random. On the contrary, hardware designers work very hard to make sure computers run every program the same way every time. So when a program does need random numbers, that requires extra effort. Traditionally, computer scientists and programming languages have distinguished between two different kinds of random numbers: statistical and cryptographic randomness. In Go, those are

                                          Secure Randomness in Go 1.22 - The Go Programming Language
                                        • The Forty-Year Programmer

                                          Pleased to Meet You... Video version available on YouTube: In 2024, I’ll have been a programmer for 40 years. I’m not quite there yet, but I’ll get there. That’s different from making the most money developing software, or starting a software company. I do make good money. But that’s not what all this is about. I think you might want to be a software developer for a long time, in the same way that

                                          • What's bad about Julia?

                                            What's bad about Julia? Written 2021-07-25, updated 2025-07-19 Also see the sibling post: What's great about Julia? Julia is my favorite programming language. More than that actually, perhaps I'm a bit of a fanboy. Sometimes, though, the ceaseless celebration of Julia by fans like me can be a bit too much. It papers over legitimate problems in the language, hindering progress. And from an outsider

                                            • dataclassを使って、Pythonで値オブジェクトを実装する - nikkie-ftnextの日記

                                              はじめに 「アタイも挑戦したい、管理人みたいに」1 『ジョゼと虎と魚たち』めっちゃいいですよね? nikkieです。 タイトルの値オブジェクトとは、値を扱うための専用クラス2です。 これを「Pythonの@dataclasses.dataclassを使って書いたらどうなるのか」手を動かしました。 この記事は、分かったことの備忘録です。 おことわり:「今の自分が書いたらこんな感じかな」というのをまとめました。 技術的な誤りや伸びしろにお気づきの際は、コメントやTwitter @ftnext までお知らせいただけると大変ありがたいです。 目次 はじめに 目次 経緯 値オブジェクトとは 値オブジェクトの実装要件 値オブジェクトの例:競走馬名 馬の名は。値オブジェクト RaceHorseName 🐴 完成したコード 不変なことの確認 完全コンストラクタであることの確認 実装ポイント frozen

                                                dataclassを使って、Pythonで値オブジェクトを実装する - nikkie-ftnextの日記
                                              • Leaving Haskell behind

                                                For almost a complete decade—starting with discovering Haskell in about 2009 and right up until switching to a job where I used primarily Ruby and C++ in about 2019—I would have called myself first and foremost a Haskell programmer. Not necessarily a dogmatic Haskeller! I was—and still am—proudly a polyglot who bounces between languages depending on the needs of the project. However, Haskell was m

                                                  Leaving Haskell behind
                                                • bytecode interpreters for tiny computers ⁑ Dercuano

                                                  Introduction: Density Is King (With a Tiny VM) I've previously come to the conclusion that there's little reason for using bytecode in the modern world, except in order to get more compact code, for which it can be very effective. So, what kind of a bytecode engine will give you more compact code? Suppose I want a bytecode interpreter for a very small programming environment, specifically to minim

                                                  • Large Text Compression Benchmark

                                                     Large Text Compression Benchmark Matt Mahoney Last update: Mar. 25, 2026. history This competition ranks lossless data compression programs by the compressed size (including the size of the decompression program) of the first 109 bytes of the XML text dump of the English version of Wikipedia on Mar. 3, 2006. About the test data. The goal of this benchmark is not to find the best overall compress

                                                    • 「Binary Hacks Rebooted」が出ます | 雑記帳

                                                      今月(2024年8月)末にオライリージャパンから出る「Binary Hacks Rebooted」という本の執筆に、著者の一人として参加しました。私は主に浮動小数点数周りの記事を執筆しました。 O’Reilly Japan – Binary Hacks Rebooted(2024年) サポートリポジトリはこちらになります。サンプルコードなどを掲載する予定です。 oreilly-japan/binary-hacks-rebooted: 『Binary Hacks Rebooted』のサポートリポジトリ また、各Hackの中に踏み込んだ詳細な目次を以下のページで公開しています。購入に迷った際の判断材料にしてください。 Binary Hacks Rebooted 目次 | Akira Kawata binary-hacks-rebooted/toc.md at main · oreilly-ja

                                                      • From Python to Elixir Machine Learning

                                                        As Elixir's Machine Learning (ML) ecosystem grows, many Elixir enthusiasts who wish to adopt the new machine learning libraries in their projects are stuck at a crossroads of wanting to move away from their existing ML stack (typically Python) while not having a clear path of how to do so. I would like to take some time to talk to WHY I believe now is a good time to start porting over Machine Lear

                                                          From Python to Elixir Machine Learning
                                                        • Breaking CityHash64, MurmurHash2/3, wyhash, and more... | orlp.net

                                                          Hash functions are incredibly neat mathematical objects. They can map arbitrary data to a small fixed-size output domain such that the mapping is deterministic, yet appears to be random. This “deterministic randomness” is incredibly useful for a variety of purposes, such as hash tables, checksums, monte carlo algorithms, communication-less distributed algorithms, etc, the list goes on. In this art

                                                          • Why you shouldn’t use Redis as a rate limiter: Part 1 of 2

                                                            (This is the first of a two part series on rate limiting with Redis. This part will look at possible implementations, and the second part will look at performance) My colleague Eric has informed me that many companies are now using Redis to implement rate limiting, and has witnessed serious businesses doing this, first hand. “Redis?”, I thought. “Isn’t that that thing to cache your slow HTTP page

                                                              Why you shouldn’t use Redis as a rate limiter: Part 1 of 2
                                                            • Why APL is a language worth knowing

                                                              “A language that doesn't affect the way you think about programming, is not worth knowing.”, by Alan J. Perlis. Why APL is a language worth knowing Alan Perlis, the computer scientist recipient of the first Turing award, wrote “A language that doesn't affect the way you think about programming, is not worth knowing.” ― Alan J. Perlis, 1982. Special feature: Epigrams on programming. ACM Sigplan Not

                                                                Why APL is a language worth knowing
                                                              • Renato Athaydes

                                                                Revisiting Prechelt’s paper and follow-ups comparing Java, Lisp, C/C++ and scripting languages A discussion on programming languages' impact on productivity and program efficiency. In 1999, Lutz Prechelt published a seminal article on the COMMUNICATIONS OF THE ACM (October 1999/Vol. 42, No. 10) called Comparing Java vs. C/C++ Efficiency Differences to Interpersonal Differences, henceforth Java VS

                                                                • Neko: History of a Software Pet | Eliot Akira

                                                                  Neko: History of a Software Pet Neko is a cat that runs around on the screen, chasing the mouse cursor. It has led many lives through the history of computers. The original software based on this concept was written in the 1980's by Naoshi Watanabe (若田部 直). It was called NEKO.COM and ran on the Japanese computer NEC PC-9801 in the MS-DOS command line. The next version ran on the Macintosh computer

                                                                  • SIMD accelerated sorting in Java - how it works and why it was 3x faster · James Baker

                                                                    SIMD accelerated sorting in Java - how it works and why it was 3x faster 09 Jun 2022 In this post I explain a little about how to use Java’s Vector APIs, attempt to explain how they turn out fast, and then use them to implement a sorting algorithm 3x faster than Arrays.sort. I then explain some problems I found, and how I resolved them. Supporting code is published here. I’m an occasional reader o

                                                                    • research!rsc: Hash-Based Bisect Debugging in Compilers and Runtimes

                                                                      Setting the Stage Does this sound familar? You make a change to a library to optimize its performance or clean up technical debt or fix a bug, only to get a bug report: some very large, incomprehensibly opaque test is now failing. Or you add a new compiler optimization with a similar result. Now you have a major debugging job in an unfamiliar code base. What if I told you that a magic wand exists

                                                                      • ElasticsearchのFunction Score Queryのパフォーマンスを最適化する | メルカリエンジニアリング

                                                                        search infra teamのmrkm4ntrです。我々の運用するElasticsearchにはFunction Score Queryを使ったリクエストが送られてきます。Function Score Queryはサブクエリのスコアに任意の関数を適用できるというもので、とても便利な機能ですが、同時にTop K(スコアが大きいものからK個を取得する場合)クエリ処理の最適化の恩恵を受けられなくなるという欠点もあります。この記事では、Function Score Queryに用いる関数の性質を利用し、Function Score QueryとTop Kのクエリ処理の最適化を両立させる方法について説明します。本記事は読者が検索エンジンの仕組みにある程度詳しいことを想定しています。 Top Kのクエリ処理の最適化 Elasticsearchの検索機能を提供しているライブラリLuceneには、T

                                                                          ElasticsearchのFunction Score Queryのパフォーマンスを最適化する | メルカリエンジニアリング
                                                                        • Mike Kohn!

                                                                          Posted: January 12, 2023 Introduction Nintendo 64 was probably the first Nintendo system I was ever interested in (even though I never owned one until starting this project). With a MIPS CPU and based off of the SGI Indy computer, it was just intriguing. Plus everyone knows that RISC architecture is gonna change everything. Since Java Grinder already supports MIPS for the Playstation 2, I figured

                                                                            Mike Kohn!
                                                                          • 本書いたら数学愛好者の中級レベルのプログラマーからマウンティングを試みられた話 - stq2050’s blog

                                                                            関数型プログラミングが『銀の弾丸』であるという非常識な常識2022 をUPしました。長編です。 実労働時間ではけしてないですが、トライ&エラーを繰り返しながら足掛け2年ほどかかりました。 はてなブックマークで、一時期トップページに掲載されて、 その効果もあってか大変衆目を浴びた著作なのですが、副作用もあって、 福岡IT講師殺害事件のきっかけとなったのは、まさにこの「はてな村」であり、住民(の一部)は非常に筋が悪く治安が悪いのです。 実際に、 b.hatena.ne.jp においては、多数の誹謗中傷コメントがなされており、はてなの利用規約違反ですから、はてな運営が要求する法的に有効な正式なフォーマットをもって抗議し、照会、削除要請をしています。 すでに、 関数型プログラミングが『銀の弾丸』であるという非常識な常識2022 2021/12/10 に岡部氏の蔑称を使いコメントしたことで不快な思い

                                                                              本書いたら数学愛好者の中級レベルのプログラマーからマウンティングを試みられた話 - stq2050’s blog
                                                                            • Using Python to Simplify Data Operations in Data Science

                                                                              In Data Science, we primarily use Python as a programming language to perform operations on the available datasets. This article will discuss concepts and details for using Pythons to simplify data operations in data science. Pros and Cons of Python for Data OperationsEven though the pros outweigh the cons, it is crucial to look at both aspects. So, let’s have a look at the advantages and limitati

                                                                                Using Python to Simplify Data Operations in Data Science
                                                                              • Clojure's deadly sin

                                                                                This article is about laziness in Clojure. It is intended to be a comprehensive and objective (however possible) critique of lazy sequences as a feature. In no way do I want this to be a judgment of the decision to make Clojure lazy. Clojure the language is by no means formulaic; creating it involved making a plethora of impactful choices. We can judge by Clojure's longevity that the total package

                                                                                1