From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oB/XNpEt0mAlOQEAgWs5BA (envelope-from ) for ; Tue, 22 Jun 2021 20:36:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sKSMMpEt0mBLNgAA1q6Kng (envelope-from ) for ; Tue, 22 Jun 2021 18:36:01 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1CDAA2AD5F for ; Tue, 22 Jun 2021 20:36:01 +0200 (CEST) Received: from localhost ([::1]:38274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvlFe-0007fO-N5 for larch@yhetil.org; Tue, 22 Jun 2021 14:35:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvlFE-0007fE-9Q for emacs-orgmode@gnu.org; Tue, 22 Jun 2021 14:35:32 -0400 Received: from ciao.gmane.io ([116.202.254.214]:49746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvlFC-0004MH-VM for emacs-orgmode@gnu.org; Tue, 22 Jun 2021 14:35:32 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lvlFA-0003Xf-Td for emacs-orgmode@gnu.org; Tue, 22 Jun 2021 20:35:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Nick Dokos Subject: Re: table: problem with nan and if Date: Tue, 22 Jun 2021 14:35:19 -0400 Message-ID: <87zgvhg32w.fsf@alphaville.usersys.redhat.com> References: <874kdri7h6.fsf@mat.ucm.es> <87o8byltcl.fsf@gmail.com> <8735taieu3.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:7NHx05M3GLL9mjUCwhG8jFiEXQs= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624386961; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=bL9O6zwCJoYlLDAk+GA7nvLLq4F73RtHKbAN318An1g=; b=MK6oClR8lUO8t3oNchBtlHwe4hWjewyJoY6OKGfNTF6ob9qAcbRdDZR8l0Bk/IjUe+kP+l Yjt94L/gUlwP5J8FOnqpd0eGFbV0uNtB4bwz635kSOxbSyV02xRusQ1b+fDmO7e8zCMjg4 JgnCrPxBHjVfEn4GWGNVTWH3m9H9GaPs6Nr1R7lXS7dW8PhC58Z/2IftE/modmwexsOrnE LDWrP340d7xBCpaxk66lnexk/E/4UCT3BgimE6aplcAlp3otKvLMT0cgyGbqTP8nRkihiJ /01WXbHFqy2Nzc5DZstTE08E+PCHjbk4/71OwMxXbrra8cK1ojh3USe2LKSDPQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624386961; a=rsa-sha256; cv=none; b=YTB3gkJsmX1wJSM4LcKTK5bCK2LFgbLCrGsYpAEdqgDo/Eet5KnNmuYBmuuB1I0TFC8OkT /gqRog3qc1BEjVQJDlXcEiDHXM3TsgNac/VxTtOcDABqXYIZGXHTbsb8ITQRNoEpam+rHh kOgkmPtYxGlboGnje47owRF0RPte22BiaPcZydT9QjHLSSp/Q42djotIbBSY4inHWxkX09 Ii4LG13pZfsbS5Bul/tAmBhbZ0H8QRtzNAf+Auu+ONUgdLjcrBH/MpmHkmufQzODVmkBYI 0ZsZr4ANffP6FcdusIcDxUgZf79rTTzcRlIgyhwZIfdWNoQ3Q2W5TBU6ALCRWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.82 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 1CDAA2AD5F X-Spam-Score: -1.82 X-Migadu-Scanner: scn1.migadu.com X-TUID: q5JWhrREm1cU Uwe Brauer writes: >> Uwe Brauer writes: > > >> I'm not very familiar with calc, but am wondering if the issue is the >> 'nan'. In many languages, a nan is a 'polluting' variable i.e. once you >> have a nan as a form anywhere in your calculation, the result will >> always be a nan. Many languages actually have a special function to test >> for a nan because it isn't actually a 'value'. Don't know if this is the >> case with calc. > > Yeah, when I googled, I found complains about nan using in calc but I > did not really found an working alternative. > >> Perhaps an alternative strategy might help. Could you address what is >> generating the nan and change that so that it generates something else, >> possibly even a blank string and avoid the nan altogether? > > I tried nil and other expressions but non really worked, so maybe a calc > guru could clarify? > Could you write the formulas in lisp instead? You might be able to control things more easily: (info "(org) Formula syntax for Lisp") -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler