Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1036388 // differentByEpsilonRatio

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (211L) is out of date.

sbool differentByEpsilonRatio(double a, double b, double epsilon) {
  int signA = sign(a), signB = sign(b);
  if (signA != signB) true;
  if (signA == 0) false;
  ret diffRatio(abs(a), abs(b)) > epsilon;
}

Author comment

Began life as a copy of #1036228

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1036388
Snippet name: differentByEpsilonRatio
Eternal ID of this version: #1036388/4
Text MD5: 54f470c5c180b2f3ebd51066d5a5fb4e
Author: stefan
Category: javax / math
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-03-13 21:00:41
Source code size: 210 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 147 / 196
Version history: 3 change(s)
Referenced in: [show references]