From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Simon Pugnet <simon@polaris64.net>
Newsgroups: gmane.emacs.help
Subject: Re: Using Calc unit conversion functions in an Org Spreadsheet
Date: Fri, 17 Nov 2023 07:32:07 +0000
Message-ID: <87msvcal8o.fsf@polaris64.net>
References: <87msvfp9p1.fsf@polaris64.net> <878r6zngoc.fsf@ucl.ac.uk>
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="32793"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: help-gnu-emacs@gnu.org
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 17 08:32:58 2023
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1r3tLV-0008JE-UL
	for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 17 Nov 2023 08:32:58 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <help-gnu-emacs-bounces@gnu.org>)
	id 1r3tKz-0005dZ-N7; Fri, 17 Nov 2023 02:32:25 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <simon@polaris64.net>)
 id 1r3tKx-0005dR-Sm
 for help-gnu-emacs@gnu.org; Fri, 17 Nov 2023 02:32:23 -0500
Original-Received: from mout-p-201.mailbox.org ([80.241.56.171])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <simon@polaris64.net>)
 id 1r3tKv-0005ku-TX
 for help-gnu-emacs@gnu.org; Fri, 17 Nov 2023 02:32:23 -0500
Original-Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4SWpWY0Lfqz9sy0;
 Fri, 17 Nov 2023 08:32:09 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polaris64.net;
 s=MBO0001; t=1700206329;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=9kMPDU34bk7+rCZq9U/cE/gp7E81tlksLarqpTq+dk0=;
 b=VkTO9x6io7D/mpiwsy/CLpkzGue/tzQGqtBWB596nzwaBqZYSuo/YrUDmyZpFyWx0Iwhax
 PLRZrAkvv+DawZIUDhRQSvmWS/c3HhD6UwBvH7cmCltZHoHEp+dgiB4RxStrFL33qItDCV
 Gkue4t/pX6+yEv/EhyvcmE17bGTbMhDHIjPMj5WoBAEletj+3GZe6z1Wyvjb5Smt4UTWXc
 nXW56uTSRk6QOOlVYWCMwwDHqN1i3vDAl0aPnbqY1fgm7Jyl3HEwv8dZIlAv8QEOl5Ye4X
 F2eP78sVRTANTSuQu64x8A8M96QFRFMj05boa6BuGiwFDzppsjAwIQOhLw8PUA==
In-Reply-To: <878r6zngoc.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Wed, 15
 Nov 2023 16:07:47 +0000")
Received-SPF: pass client-ip=80.241.56.171; envelope-from=simon@polaris64.net;
 helo=mout-p-201.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LOTS_OF_MONEY=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>,
 <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
 <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.help:145551
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/145551>

--=-=-=
Content-Type: text/plain

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> How about the following:
>
>
> | Task    | Time estimate | alternative | Rounded hours | CPH         | Cost          |
> |---------+---------------+-------------+---------------+-------------+---------------|
> | Task #1 | 1 hr + 35 min | 1.5 hr      | 1.75 hr       | 50 GBP / hr | 87.5 GBP      |
> | Task #2 | 0 hr + 20 min | 0.25 hr     | 20. min       | 50 GBP / hr | 16.666667 GBP |
> #+TBLFM: $3=round($-1/(15 min))*hr/4;u::$4=usimplify(ceil($2*4)/4)::$6=usimplify($5*$4)
>
> (see new column "alternative")

Thanks Eric, that works nicely. Thanks too for reminding me about the
units simplification mode (;u), that saves calls to usimplify.

Kind regards,

Simon

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJIBAEBCAAyFiEEO/eF3hYsAMj7Tab9uhNZqCwLPvkFAmVXFvcUHHNpbW9uQHBv
bGFyaXM2NC5uZXQACgkQuhNZqCwLPvmcng/6AkYoB19BELYouMfVcvKdF3Mt6aFO
JFU7Imv8juwV4YmyZm6zUshyiVmlq0arxiSdMH8iwWGEI+BRhgVkOSCmR5kiOZ0z
6VPLANlovpg/KNYs7uV4VqW6YIM1nCWVro/dJs2KKzJSzYPw/me7gA9EcQkst123
cNeNCKFe3Jf3CzwCC1wH3yK3+a9CTglMWvznDxOF3VXHmQ291/OQh8IWuEX3X3A0
CUUIjV+UvMINxMO60cpc34Lpeda+E08QwFoXHslOyyuWcyXm2qI4uG40vJOlnVNP
3xnwsnwNYG7vaiOuOOdWVqVlBwf0j8XYzoFyqlX/f3iXjUhaS2BCsSDauyQG5Qw7
kLeKDjZlhzUh64YFclw0W0AiXU2tJGP9TlYQUptBWs5q5LueHjSYjcwdgPw04RQG
IOpxEvHciOP7cvdRRbswPSKNDsx3ZnGk6bP8ugRpem0dR3FcYwSdXpn+iyMdBW9A
7aCdAFfMV4KqQveMsaMdhOE6A9F56BMo/rVyszQFMCRm4VvboJUZcUKK5g29geTi
x5GcwkqXVhWmzdzYvcV0gTOmMFzc8JclNZWQEJkaEF57Lia+pxGJE4k6+M7DHcH9
bQZNgXykeLwaWEFNOHDAGL/LqeU1wdKX4ypIbL1h5SmINHK26dyHMxE128wwi4FA
B91tCSWsy/FBvw0=
=RUfQ
-----END PGP SIGNATURE-----
--=-=-=--